The AssignFile process enables the name of the external file with the file variable
unit
SYSTEM
species
File management program
Delphi syntax:
Procedure assignfile (var f; filename: string); Details:
Call AssignFile in the Delphi code to initialize a File variable. F is a file type variable, filename is a String-Type expression, and if the extension syntax switch is turned on, then the PCHAR type is also allowed. After calling assignfile, f If there is no closed, the variable f will always be associated with an external file. All more on the File variable F will correspond to an external file called FileName. If the filename parameter is empty, AssignFile associates F with the standard input or standard output file. If you assign an empty name, after the reset (f) is called, f will reference the standard input file, and the REWRITE (F) will be called, f will reference the standard output file. Do not use AssignFile to use the file variable already opened. Note: In order to avoid scope conflicts, AssignFile will replace the ASSIGN stored procedure in Delphi earlier versions, which is still valid for backward compatibility.