Name
WriteLn Procedure
Syntax
procedure WriteLn(Expr:Width:Precision; ...); procedure WriteLn(var F: TextFile;Expr:Width:Precision; ...);
Description
WriteLn
is just like the
Write procedure, except it prints a line ending
after printing its arguments. A line ending is a carriage return
followed by a line feed (#13#10). With no
arguments, or only a TextFile argument,
WriteLn prints only a line ending.
Tips and Tricks
If the file has not been assigned,
Writereports I/O error 102.If the file is not open for write access,
Writereports I/O error 104.When the write fails because the disk is full, sometimes
Writereports the Windows errorError_Disk_Full(112); sometimes it reports I/O error 101.If no
TextFileis given as the first argument,WriteLnwrites toOutput.See the
Writeprocedure for a description of how to format the output.
Example
// Print a table of square roots. WriteLn('Num Square root'); for I := 1 to 10 do WriteLn(I:3, '':2, Sqrt(I):18:15);
See Also
| BlockWrite Procedure, IOResult Function, Output Variable, ReadLn Procedure, TextFile Type, Write Procedure |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access