Casio PB-100 Instruction Manual page 52

Table of Contents

Advertisement

F O R
I - l
T O
5
S T E P l
F O R J = 2 T O 2 0 S T E P 2
5
N E X T
I
N E X T
J
This kind of FOR'NEXT loop
cannot be assembled.
Furthermore, exit from FOR' N EXT loop is permitted but entry to FOR' N EXT loop is
not permitted.
F O R A =
F O R
B
T H E N -
N E X T
B
N E X T
A
5 - 6 - 6 S u b r o u t i n e C o m m a n d
• G O S U B s t a t e m e n t
A subroutine is also called a subprogram . It is different from programs shown so far
(called "main routines"). It is a separate program to be called out from a main routine.
The command to call out this subroutine is a GOSUB statement. Using this command,
program execution jumps from the main routine to the subroutine and after executing
the program in the subroutine, jumps back to the original location in the main routine
» using the RETURN statement in the subroutine.
Format: GOSUB / ""-"encal expression
ff numerical expression subroutine callout (jump) command
R E T U R N
c o m m a n d
t o
r e t u r n
t o
m a i n
r o u t i n e
- 5 1
-

Advertisement

Table of Contents
loading

Table of Contents