Vtech PreComputer Power Pad Plus User Manual - Page 61
Gosub 120, Other Program Lines, Print Welcome To The, Print Precomputer Power Pad Plus, Return,
View all Vtech PreComputer Power Pad Plus manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 61 highlights
Example: 30 GOSUB 120 . . other program lines . . 120 PRINT "WELCOME TO THE" 130 PRINT "PRECOMPUTER POWER PAD PLUS" 140 RETURN GOTO Line # GOTO line number The GOTO statement is used to change the normal flow of the program (which is from the lowest statement number to the highest). A GOTO command transfers control to the specified line. Examples: 10 GOTO 130 200 GOTO 65 IF...THEN...ELSE In general terms, the IF...THEN... statement is used for CONDITIONAL BRANCHING. It uses the general form "IF (condition) THEN (action clause)". A condition is made up of an expression, a relation and another expression. Any BASIC expression, either numeric or string, may be used, but both expressions must be the same type. 57
57
Example:
30
GOSUB 120
.
.
other program lines
.
.
120
PRINT “WELCOME TO THE”
130
PRINT “PRECOMPUTER POWER PAD PLUS”
140
RETURN
GOTO
Line #
GOTO
line number
The
GOTO
statement is used to change the normal flow of the program (which is from
the lowest statement number to the highest).
A
GOTO
command transfers control to the
specified line.
Examples:
10
GOTO 130
200
GOTO 65
IF...THEN...ELSE
In general terms, the
IF
...
THEN
...
statement is used for
CONDITIONAL BRANCHING
.
It
uses the general form “
IF
(condition)
THEN
(action clause)”.
A condition is made up of
an expression, a relation and another expression.
Any
BASIC
expression, either numeric or string, may be used, but both expressions must
be the same type.