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 - #include header file inclusion http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 #include            Header file inclusion
------------------------------------------------------------------------------
 Syntax
   #include <filename>

 Arguments
   <filename> is the name of source file to include in the module being
   compiled.

 Description
   The #include directive is usually placed at the beginning of a
   source file and instructs the preprocessor to include the contents of
   the given file in the compilation of the source code.

   Files included by the #include directive are normally the so-called
   header files. Header files usually contain those function prototypes
   and other declarations that are referenced by more than one source
   module. Typical examples are the standard header files supplied with
   the Force package.

   The filename argument may contain a path and can optionally be surrounded
   with the "" or <> delimiters. Instead of hardcoding the paths in the
   source, it is recommended to use the FORCE.HDR environmental variable,
   or the -Fi compiler switch.

   If the drive and/or path of the file is specified, only that path is
   searched for the file. If no path is given, then the file is searched
   in the current directory, then in any directory specified with the -Fi
   compiler switch, finally in the path specified by the FORCE.HDR environment
   variable.

 Example
   #define EXAMPLE_DIRECTIV
   #include example.hdr

   #include string.hdr               // declares istr()
   #include date.hdr                 // declares day()
   #include system.hdr               // declares today()
   
   // #include c:\force\hdr\string.hdr  // hardcoded path not recommended
   // #include staracc.hdr              // application's header
   // #include addlib.hdr               // another library's header
   
   proc Test_855
   ? "Day of week is", istr( day( today() ) )
   endproc

   proc main
   Test_855()
   endproc

See Also: -Fi

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