<<

Contents

Search

>>

 

GET

 

 

Instruction

 

 

Syntax:

GET <File Number>,<Record Number> ON ERROR ... END

 

<File Number>

= <NUM-EXPRESSION>

<Record Number>

= <NUM-EXPRESSION>

 

 

Meaning:

Reads a record of a RANDOM file.

 

The record with the number <Record Number> is read from the file with the number <File Number>. The file must have been opened with OPEN RANDOM.

 

In the case of an error the block ON ERROR ... END is executed. The variable OK contains the error number and ERRORTEXT$ contains the error text.

 

Parameter:

File Number

File number of RANDOM file

Record Number

Number of record to read

 

Sample:

OPEN RANDOM,1,"TESTDAT.DAT",75

     ON ERROR … Error … END

FIELD 1,75 AS P$

GET 1,10 ON ERROR … Error … END

 

See also:

OPEN

PUT

FIELD

CLOSE

EOF

OK

ERRORTEXT$

Error numbers