Commodore 128 System Manual page 248

Table of Contents

Advertisement

B EG IN /B E N D
A structure used with IF...THEN ELSE so that you can include
several program lines between the start (BEGIN) and end (BEND)
of the structure. Here is the format:
IF Condition THEN BEGIN : statement
statement
statement BEND : ELSE BEGIN
statement
statement BEND
EXAMPLE:
10 IF X=1 THEN BEGIN: PRINT "X=1 is True"
20 PRINT "So this part of the statement is performed"
30 PRINT "When X equals 1"
40 BEND: PRINT "End of BEGIN/BEND structure":GOTO 60
50 PRINT "X does not equal 1":PRINT "The statements
between BEGIN/BEND are skipped"
60 PRINT "Rest of Program"
If the Conditional (IF..THEN) statement in line 10 is true, the
statements between the keywords BEGIN and BEND are
performed, including all the statements on the same line as
BEND. If the (IF..THEN) conditional statement in line 10 is FALSE,
all statements between the BEGIN and BEND, including the ones
on the same program line as BEND are skipped, and the program
resumes with the first program line immediately following the line
containing BEND. The BEGIN/BEND essentially treats lines 10
through 40 as one long line.
The same rules are true if the ELSE:BEGIN clause is specified. If
the condition is true all statements between ELSE:BEGIN and
BEND are performed, including all statements on the same line
as BEND. If False, the program resumes with the line immediately
following the line containing BEND.
BLOAD
Load a binary file starting at the specified memory location
BLOAD "filename"[,Ddrive number] [CON | ,>Udevice
number] [,Bbank number] [,Pstart address]
17-6

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents