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 - file buffered file structure http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 file                Buffered file structure
------------------------------------------------------------------------------
 Syntax
   file

 Arguments
   None.

 Features
   +----------------------------------------------------------------------+
   | Category             | special (file structure)                      |
   | Size                 | N/A                                           |
   | Range                | N/A                                           |
   | Parameter: value     | no                                            |
   | Parameter: reference | yes                                           |
   | Parameter: const     | yes                                           |
   | Return               | no                                            |
   +----------------------------------------------------------------------+

 Description
   The file datatype holds information for manipulating disk files,
   using the buffered file I/O functions provided in the library.
   Variables of the file data type must not be used and accessed by any
   other means than by declaring and sending them to the respective
   library or user defined functions.

 Example
   #define EXAMPLE_DATATYPE
   #include example.hdr

   proc Reader
   param file fFile           // file datatype used as parameter
   vardef
      char cLine
   enddef
   fgetln( fFile, cLine )
   ? cLine
   endproc
   
   proc Test_file
   vardef
      file fTest
   enddef
   if fopen( fTest, "c:\autoexec.bat", F_READ, F_TEXT )
      Reader( fTest )
      fclose( fTest )
   endif
   endproc

   proc main
   Test_file()
   endproc

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