Commodore 128 System Manual page 283

Hide thumbs Also See for 128:
Table of Contents

Advertisement

INPUT
Receive a data string or a number from the keyboard and wait for
the user to press RETURN.
INPUT [" prompt string";] variable list
The INPUT statement asks for data from the user while the
program is RUNning and places the data into a variable or
variables. The program stops, prints a question mark (?) on the
screen, and waits for the user to type the answer and hit the
RETURN key. The word INPUT is followed by a prompt string and
a variable name or list of variable names separated by commas.
The message in the prompt string inside quotes suggests
(prompts) the information the user should enter. If this message is
present, there must be a semicolon (;) after the closing quote of
the prompt.
When more than one variable is INPUT, separate them by
commas. The computer asks for the remaining values by printing
two question marks (??). If the RETURN key is pressed without
INPUTing a value, the INPUT variable retains its previous value.
The INPUT statement can be executed only within a program.
EXAMPLE:
10 INPUT " PLEASE TYPE A NUMBER";A
20 INPUT " AND YOUR NAME";A$
30 PRINT A$;"YOU TYPED THE NUMBER";A
INPUT#
Inputs data from a file into the computer's memory
IN PU T# file number, variable list
This statement works like INPUT, but takes the data from a
previously OPENed file usually on a disk or tape instead of the
keyboard. No prompt string is used. This statement can be used
only within a program.
EXAMPLE:
10 OPEN 2,8,2," DATAFILE,S,R"
20 INPUT#2, AS, C, D$
1 7 - 4 1

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents