Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> rewrite open and clear file for processing pp 94</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 REWRITE              Open and Clear File for Processing               pp 94

 Syntax:  ReWrite (FileVar) ;

 Type:    File

 Form:    Procedure

 Purpose: Open file for write only.  The file pointer is set to the
          beginning of the file, and any existing data is discarded.


 ----------------------------------------------------------------------------


 Usage:
       TYPE
          FileType = String [80]              ;  { Define record size    }
       VAR
          FileVar  : File of FileType         ;  { 80 byte record type   }
       CONST
          FileName : String [8] = 'Name.Ext'  ;  { Constant file name    }

       BEGIN
          Assign  (FileVar,FileName)          ;  { Assign name to handle }
          ReWrite (FileVar)                   ;  { Open file handle      }
       END.

See Also: Assign Files Reset

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