VTech Precomputer Power Pad Plus User Manual

Page 61

Advertising
background image

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.

Advertising