AT&T 6300 Programmer's Manual page 297

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

Example
Example
INPUT
Statement
Responding to INPUT with too many or too
few items or with the wrong type of value
(numeric instead of string, etc.) causes the
message "?Redo from start" to be printed. No
assignment of input values is made until an
acceptable response is given.
The user may use all the GWBASIC screen
editor features in responding to INPUT and
LINE INPUT statements.
10 INPUT X
20 PRINT
X
"SQUARED IS"
X
~
2
30 END
RUN
?5
5 SQUARED IS 25
Ok
10 PI=3.14
20 INPUT "WHAT IS THE RADIUS"jR
30
A=PI*R~2
40 PRINT "THE AREA OF THE CIRCLE IS"jA
50 PRINT
60 GOTO 20
Ok
RUN
WHAT IS THE RADIUS? 7.4
THE AREA OF THE CIRCLE IS 171.9464
WHAT IS THE RADIUS?
etc.
7-141

Advertisement

Table of Contents
loading

Table of Contents