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

184 BGET# get a byte from file Purpose Numbers and words can be recorded on cassette tape and on disc. The function BGET# enables a single character or number to be read back into the computer from the cassette, disc or network. Before using this statement a file must have been opened using the OPENIN function or else an error will occur (see chapter 31 for more information about ‘files’). When a file is opened, using OPENIN , the computer will allocate the file a channel number. This number must be used in all subsequent operations on the file, for example when reading the file or when writing a new file. Again see the chapter on file handling for more information.

Examples 6000 character=BGET# (channel) 340 next_letter%=BGET#C Description A function which gets a byte from the file whose channel number is the argument. The file must have been opened before this statement is executed. Syntax = BGET# Associated keywords OPENIN , OPENUP , OPENOUT , CLOSE# , EXT# , PTR# , PRINT# , INPUT# , BPUT# , EOF#