Home Page


BASIC Handbook

Basic2 Commands
Disk Drives
PEEK's and POKE's
RAM Memory Map
ROM Memory Map
Screen Display
Sprite
ASCII and CHR$ Codes

eMail
email5-commodorecheetah.co.uk

Note: You will need to replace the '-' with the @ symbol.
This is to minimize spam.

My BASIC Quick Reference Guide

GET
Abbreviation:

TYPE: Statement
FORMAT: GET <variable list>

Action: This statement reads each key typed by the user. As the user is typing, the characters are stored in the Commodore 64's keyboard buffer. Up to 10 characters are stored here, and any keys struck after the 10th are lost. Reading one of the characters with the GET statement makes room for another character.

If the GET statement specifies numeric data, and the user types a key other than a number, the message ?SYNTAX ERROR appears. To be safe, read the keys as strings and convert them to numbers later.

The GET statement can be used to avoid some of the limitations of the INPUT statement. For more on this, see the section on Using the GET Statement in the Programming Techniques section.

EXAMPLES of GET Statement:

10 GET A$: IF A$ ="" THEN 10: REM LOOPS IN 10 UNTIL ANY KEY HIT
20 GET A$, B$, C$, D$, E$: REM READS 5 KEYS
30 GET A, A$


Commodore Cheetah made by Allen Monks, started in the year 2000.