Page 1 of 1

main module and scoping

PostPosted: Thu Apr 24, 2014 11:28 am
by Jerry Messina
If I have the following main module...
Code: Select all
dim b as byte

sub main()
    dim b as byte
   
    // access module-level b??
   
end sub


Is there any syntax for accessing the module-level variable? I know if I was in a module I could use modulename.b, but what about here?

Re: main module and scoping

PostPosted: Thu Apr 24, 2014 4:20 pm
by David John Barker
>Is there any syntax for accessing the module-level variable?

No, you would need to use a different naming convention.