Topic complex |
Text functions |
Function |
writeln() |
Short |
Writes a string (plus CR/LF) to a text file |
Syntax |
WRITE(t : INTEGER; s : STRING) : STRING |
Parameter |
t : text handle from REWRITE or TAPPEND
s : STRING |
Return |
s (is return unchanged) |
See also: |
|
Description |
If t=0, it is written to StdOut.
After the string a end of line is written to the text file:
LF (Linux, FreeBSD)
CRLF (Win32)
Attention: tdbengine works internal in ASCII format. If a file should be written in ANSI format the string must be formatted according to that:
WRITELN(t,OEMTOANSI(s))
The better oportunity is to open the file in ANSI mode:
t:=rewrite(textfile,0)
writeln(t,s)
|