<<

Contents

Search

>>

 

PUT

 

 

Instruction

 

 

Syntax:

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

 

<File Number>

= <NUM-EXPRESSION>

<Record Number>

= <NUM-EXPRESSION>

 

 

Meaning:

Writes a record into a RANDOM file.

 

The record with the number <Record Number> is written into 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 then contains the error number and ERRORTEXT$ the error text.

 

Parameter:

File Number

File number of RANDOM file

Record Number

Number of record to write

 

Sample:

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

     ON ERROR … error … END

FIELD 1,75 AS P$

LSET P$ = "Hello World"

PUT 1,10 ON ERROR … error … END

 

See also:

OPEN

GET

FIELD

CLOSE

EOF

OK

ERRORTEXT$

Error numbers