Put# Command

Purpose

Writes a record to a random access file.

Syntax

Put[%] #n [[,record], variable]

n:integer expression; channel
record:integer expression
variable:variable name

Description

Put # writes a record to an R-file through the channel n (from 0 to 511), previously opened with Open. record is an optional parameter and contains a value between 0 or 1 depending on Option Base, and the number of records within the file. If record is not specified the next record in file is always written out.

Put #n, variable writes the contents of the variable to the file.

Put% internally uses 32-bit access and writes records to a file with a maximum size of 2GB.

Example

See Get #.

Remarks

Put # can only add one record to a file. To add several records to an R-file a loop containing a Put # must be created.

See Also

Field, Get#, Record

{Created by Sjouke Hamstra; Last updated: 12/05/14 by James Gaite}