<<

Contents

Search

>>

 

FIELD

 

 

Instruction

 

 

Syntax:

FIELD <File Number>, <Length> AS <Variable> [,<Length> AS <Variable>]..

 

<File Number>

= <NUM-EXPRESSION>

<Length>

= <NUM-EXPRESSION>

<Variable>

= <STRING-VARIABLE>

 

 

Meaning:

Defines file buffer variables for RANDOM files.

 

The variables <Variables> have the definite length <length> and new values can only assigned to them by the instructions RSET and LSET .

 

Any number of FIELD instructions can be executed for the same file number. Each FIELD instruction specifies a set of variables for the file buffer.

 

All FIELD instructions that were executed by OPEN after the opening of the file are valid at the same time.

 

Parameter:

File Number

Number of file

Length

Length of variable

Variable

Name of string variable

 

Sample:

OPEN RANDOM,1,"TESTDAT.DAT",75 ON ERROR … Error … END

FIELD 1,70 AS P1$,5 AS P2$

FIELD 1,9 AS A29$, 50 AS AB$, 1 AS A$,15 AS A4$

FIELD 1,75 AS T$

 

See also:

RSET

LSET

OPEN

GET

PUT