Re: global procedure / function

new topic     » goto parent     » topic index » view thread      » older message » newer message
eeel said...

can anyone explain to me the difference between PROCEDURE and GLOBAL PROCEDURE? likewise between FUNCTION and GLOBAL FUNCTION?

That has to do with the scope of a declaration (Variable, Function or Procedure)

Euphoria 4.0 docs said...
  • If the keyword global precedes the declaration, the scope of these identifiers extends to the whole application. They can be accessed by code anywhere in the application files.
  • If the keyword public precedes the declaration, the scope extends to any file that explicitly includes the file in which the identifier is declared, or to any file that includes a file that in turn public includes the file containing the public declaration.
  • If the keyword export precedes the declaration, the scope only extends to any file that directly includes the file in which the identifier is declared.

You can read more about this topic here.

HTH

-xecronix

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

Search



Quick Links

User menu

Not signed in.

Misc Menu