March 2000
Intermediate to advanced
576 pages
18h 13m
English
Erase Procedure
procedure Erase(var F: File); procedure Erase(var F: TextFile);
Erase deletes the file that is assigned to
F. The file should be closed, but with a filename
assigned to it. Erase is not a real
procedure.
If AssignFile has not been called,
Erase raises I/O error 102.
If the file cannot be deleted, Erase reports an
I/O error using the Windows error code. In particular, if the file is
open, the Windows error code is 32 (file in use), and if the file is
read-only, the Windows error code is 5 (access is denied).
| AssignFile Procedure, CloseFile Procedure, File Keyword, IOResult Function, Rename Procedure, TextFile Type |
Read now
Unlock full access