[Overview][Constants][Types][Procedures and functions][Variables] | Reference for unit 'objpas' (#rtl) |
Assign text or untyped file
Source position: line 0
procedure AssignFile( |
var f: file; |
const Name: String |
); |
var f: file; |
p: pchar |
); |
var f: file; |
c: Char |
); |
var t: Text; |
const s: String |
); |
var t: Text; |
p: pchar |
); |
var t: Text; |
c: Char |
); |
var f: TypedFile; |
const Name: String |
); |
var f: TypedFile; |
p: pchar |
); |
var f: TypedFile; |
c: Char |
); |
AssignFile is completely equivalent to the system unit's Assign function: It assigns Name to a function of any type (FileType can be Text or a typed or untyped File variable). Name can be a string, a single character or a PChar.
It is most likely introduced to avoid confusion between the regular Assign function and the Assign method of TPersistent in the Delphi VCL.
None.
|
Close text or untyped file |
|
|
Assign a name to a file |
|
|
Open file for reading |
|
|
Open file for writing |
|
|
Open a file in append mode |
Program Example88; { Program to demonstrate the AssignFile and CloseFile functions. } {$MODE Delphi} Var F : text; begin AssignFile(F,'textfile.tmp'); Rewrite(F); Writeln (F,'This is a silly example of AssignFile and CloseFile.'); CloseFile(F); end.
No notes exist for this page yet.