[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FIELD Allocate Space for Random File Variables
FIELD [#]filenum, fieldwidth AS stringvar [,fieldwidth AS stringvar]...
Allocates storage for any number of string variables, each of
specified character width, to be used in conjunction with a specified
random file buffer.
filenum The number under which the file was OPENed.
fieldwidth The number of character positions to be allotted to
stringvar.
stringvar A string variable to be used for random access.
-------------------------------------------------------------------------
Notes: Once the random file has been FIELDed, data may be
extracted from the random file buffer after a GET
statement or placed into the buffer in preparation for a
PUT statement.
A string variable defined by means of the FIELD statement
points to a specified position in the random file buffer.
It should not thereafter be used as an INPUT variable or
on the left side of an assignment statement. Doing either
of these things will point the variable name into the
string space and remove it from the file buffer. Use RSET
and LSET to assign values to the fields when preparing to
write to the random access file.
Multiple field definitions for a given random file buffer
are permitted. Each new FIELD statement starts again at
the first character position of the buffer, and all FIELD
statements for a given random file are in effect
simultaneously. All FIELD definitions are removed when a
file is CLOSEd.
See Also:
GET (File I/O)
LSET
PUT (File I/O)
RSET
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson