Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

301 PTR# pointer Purpose This statement is not available on cassette based systems. It selects which item in a long file is to be read or written next. Strings and numbers are stored in a long line one after the other. Each integer number occupies five bytes, each real number occupies six bytes and each string takes up the number of letters in the string plus two. See the keyword PRINT# for more details of the file format. The file pointer can be moved up and down the file to point to any selected word or number. Note that you have to keep a careful track of where each word or number starts to use the function.

The number immediately following the keyword PTR# is the channel number allocated to the file when it was opened. A file must be opened with the OPENIN and OPENOUT statements. See chapter 31 for more information on file handling. Examples PRINT PTR#X 560 PTR#file=PTR#file+80 85 PTR#channel=0 Description A statement and function which allows the programmer to move a pointer to a serial file and thus enables random access. Syntax = PTR# or PTR# = Associated keywords INPUT# , PRINT# , BGET# , BPUT# , OPENIN , OPENUP , OPENOUT , EXT# , EOF#