[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Write Writeln Writes List of Items
Write(<var list>);
Writeln(<var list>);
Write(var TFile : text; <item list>);
Writeln(var TFile : text; <item list>);
Write(var DFile : file of <type>; Item : <type>); [TP]
Writes data from the specified item(s). If no file is specified, then
writes out to the predefined file Output, which (by default) is
assigned to the screen (CON:). If a text file is specified, then
writes out to that text file, which must have been previously opened
for output (using Assign and Rewrite). If a data file (file of <type>)
is specified, then writes Item as the next component in DFile.
<item list> Optional list of items which are written out,
separated by commas. Allowable items include
variables, constants, function calls, or expressions
of type Integer, Real, Char, Boolean, or string.
TFile Text file
DFile Data file
<type> Any data type except for file; can be Integer, Real,
Char, Boolean, an enumerated data type, an array type,
a record type, a set type, or a string type.
Item A variable of type <type>.
-------------------------------- Example ---------------------------------
Write('Hi.');
Writeln(A,' plus ',B,' equals ',A+B);
Writeln(TFile,A,' plus ',B,' equals ',A+B);
Write(DFile,MyRec);
See Also:
Assign
Rewrite
Read
Put
Output
CON
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson