GET - input from file.

Usage:

var
    f : file of TYPE;
   ...
get(f);

Where:

f
is a variable of any valid file type. "f" must be associated with an open file before "get" is called. This means opening "f" with the "openf" function, or associating "f" with a file on the command line that invokes the program.

Description:

The "get" procedure reads the next data item from the file associated with "f" and stores the value in the buffer variable "f^". This file must be open before "get" is called.

If "eof(f)" is true at the time that "get" is called (i.e. you have already reached end of file), Pascal will issue an error message.

If you call "get" to read something and there is nothing left in the file, "get" will set "eof(f)" true and the contents of "f^" will be undefined. Subsequent calls to "get" will receive an error, as noted previously.

See Also:

expl pascal lib put

Copyright © 1996, Thinkage Ltd.