Table of Contents

GET

Reads a record from a device or random-access file; in some BASICs reads the next character eventually available from the keyboard; may also copy an area of a graphic screen

Implemented by: ansifull, Atari, msatari, trsdisk, BBC, GWBASIC, msxdisk, bwbasic, bw32, VBDOS

With variations: hptsb, decbasic, Applesoft, tasc (for a numeric variable, defaults to 0 if a non-digit is entered), CBM, atxl (special behaviour with graphics), level3 (includes GET@ for screen coordinates), colorext (graphics: reads content from a rectangle into an array), Atom (for files only), ABasiC, QBasic (both for files/devices and for graphics to retrieve a pixels matrix), FreeBASIC, ugBASIC (as GET IMAGE), minibasicjs

Also written as:

Usage

Variations

In the Applesoft-ish Micro-Professor BASIC and early Acorn BASIC, the GET keyword was somewhat similar in functionality of INKEY$ found in other BASICs, but there is a significant difference: GET works in blocking mode. Just like INPUT, it sits and waits until a key is pressed. It dispenses the usual INKEY$ loop so common in menus, for example, but it will not work for games. PEEK and POKE workarounds would allow INKEY$ simulation with detection of keyboard scan codes and further conversion to ASCII character codes 1) 2).

Examples

Comments

Similar keywords

In other languages...

References

1)
"A Função INKEY$ no TK-2000": INPUT (Brazilian edition) vol. 2, p. 496-499. Nova Cultural, 1986, Brasil
2)
"Right..Up…Left…Fire!": INPUT (British edition) vol 1, p.55. Marshall-Cavendish, 1985, England. Available online in https://archive.org/details/Input_Vol_1_No_02_1997_Marshall_Cavendish_GB/page/n23/mode/2up last checked 2023-02-18