Re: Question on scope

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jeff Zeitlin writes:
> If I have
>
>   include foo.e
>   include bar.e
>   include baz.e
>
> in a Euphoria source file, the public routines of foo.e are _not_ available
> to routines in bar.e or baz.e _unless_ those files include foo.e, correct?

You could make a good case for that behavior, but in fact,
the globals of foo.e are available automatically to bar.e and baz.e,
whether namespaces are defined or not.

Kat writes:
> If you include foo more than 
> once, or in a nested include, you get an error.

You can include foo.e again if you want. 
All  subsequent includes of foo.e will be ignored (no error), 
except that you can specify a namespace identifier on 
any include statement, and even have multiple identifiers 
refering to the same include file.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu