Fragezeichen am Ende eines INPUT entfernen

 

Programmers new to ATARI BASIC wonder about the question mark that appears following
an INPUT statement. It generally looks something like this:
WHAT IS YOUR NAME?

If you don’t want to phrase the prompt as a question, and only need a single-key
response, you can open a channel to the keyboard:

10 PRINT „ENTER MENU ITEM“
20 DIM AN$(1):0PEN #1,4,0,“K:“: GET #1, A
30 AN$ = CHR$(A):CLOSE #1

This returns the ATASCII code only for the last key pressed. To get more than one-key
input, adapt the technique of this example:

10 DIM NAME$(10)
20 OPEN #1,4,0,“E:“:REM OPEN A CHANNEL TO SCREEN EDITOR
30 ?:? „Enter your name and press [RETURN]“ :INPUT #1,NAME$
40 ?: ? „Now your age.“: INPUT #1, AGE
50 ?:?:? NAME$;“ is „;AGE;“ years old.“:CLOSE #1

Keep in mind that opening a channel to the screen editor (line 20) resets the Graphics
Mode to 0, clears the screen and sets colors to default values. If you are planning a fancy
Graphics 0 format, set it up after opening the channel to „E:“