Skip to content

N Device Get Record

Thomas Cherryhomes edited this page Jan 30, 2020 · 1 revision

Description

GET RECORD returns a single "record" of data, that is, data terminated by an ATASCII EOL ($9B) such as text.

For convenience, CR/LF is automatically translated to an EOL.

Parameters

  • IOCB

Returns

  • If successful, an error code of 1 is returned.
  • If the end of buffer is reached before an EOL, an ERROR 136 is returned.
  • If the buffer requested is full before an EOL, an ERROR 137 is returned.

Examples

BASIC

If an IOCB is opened, then the following will return a single record:

DIM A$(256)
INPUT #1,A$

An example of how to read a file via HTTPS:

100 REM HTTP READ TEST
110 DIM A$(256)
120 OPEN #1,4,0,"N:https://www.gnu.org/licenses/gpl-3.0.txt"
130 TRAP 200
140 INPUT #1,A$
150 PRINT A$
160 GOTO 140
200 CLOSE #1
210 END
Clone this wiki locally