[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Read Readln Reads List of Values
Read(<var list>);
Readln(<var list>);
Read(var TFile : text; <var list>);
Readln(var TFile : text; <var list);
Read(var DFile : file of <type>; var Item : <type>); [TP]
Reads data into the specified variable(s). If no file is specified,
reads in from the predefined file variable Input, which (by default)
is assigned to the keyboard (CON:). If a text file is specified, reads
in from that text file, which must have been previously opened for
input (using Assign and Reset). If a data file (file of <type>) is
specified, then reads the next component into Item.
<var list> Optional list of variables, separated by commas, into
which data are read. Allowable types are Integer,
Real, Char, and string.
TFile Text file
DFile A data file.
<type> Any type except a file type.
Item A variable of <type>.
-------------------------------- Example ---------------------------------
Readln(A,B);
while not EOLN(TFile) do
Read(TFile,A);
Read(DFile,MyRec);
Readln(TFile,X,I,Name);
See Also:
Assign
Reset
Write
Get
Input
CON
EOF
EOLN
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson