Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - extern external data storage class http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 extern              External data storage class
------------------------------------------------------------------------------
 Syntax
   func|proc [<type>] <symbol> extern

   <defblock> [<symbol>] extern

 Arguments
   <symbol> is a symbol identifier.
   <type> is a data type.
   <defblock> is the initiator keyword for a declaration block.

 Description
   The extern keyword specifies that the declared object is
   defined elsewhere in the program, i. e. in another module or in a
   library. An external symbol has permanent life and can be accessed
   from any file in which it was declared using the extern keyword.
   The scope of an external object is from the point of declaration
   through the end of the source code file.

 Example
   #define EXAMPLE_KEYWORD
   #include example.hdr

   func char istr extern      // declaration for library function
   param value long gNumber
   
   vardef extern              // declaration for library variable
      byte __syscolor[ 32 ]
   enddef
   
   // Functions, procedures, variables and other symbols that are defined in
   // other modules of the same application are declared as externals
   // identically to library symbols.
   
   proc Test_extern
   endproc

   proc main
   Test_extern()
   endproc

See Also: public

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson