main module and scoping

Discuss the Firewing language

main module and scoping

Postby Jerry Messina » Thu Apr 24, 2014 11:28 am

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?
Jerry Messina
 
Posts: 280
Joined: Thu Feb 14, 2013 10:16 am

Re: main module and scoping

Postby David John Barker » Thu Apr 24, 2014 4:20 pm

>Is there any syntax for accessing the module-level variable?

No, you would need to use a different naming convention.
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm


Return to Language

Who is online

Users browsing this forum: No registered users and 3 guests

x