[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ERASE                        Erase a Disk File                        pp 96

 Syntax:  Erase (FileVar) ;

 Type:    File

 Form:    Procedure

 Purpose: Erase disk file associated with FileVar.

 Notes:   It is good practice to Close a file before calling Erase.


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


 Usage:
       TYPE
          FileType = String [80]      ;   { Define record size         }
       VAR
          FileVar  : File of FileType ;   { Define the handle          }

       BEGIN
          Assign (FileVar,'Test.Dat') ;   { Assign filename to FileVar }
          Reset  (FileVar)            ;   { Open the file              }
          Close  (FileVar)            ;   { Close the file             }
          Erase  (FileVar)        ;   { Erase the file             }
       END.

See Also: Assign Close Reset ReWrite
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson