MPC2000 Reference Manual [JAPANESE] [ENGLISH]
yControlStatementz   yControlz
yUSEz
GOSUB,GOSUB_NE

GOSUB *Label
GOSUB *Label arg1 arg2 ..
yFORMATz yFUNCTIONz
GOSUB *Label [arg1,arg2..]

Call a subroutine that must include RETURN statement.
yEXPLANATIONz
GOSUB executes a subroutine includes a RETURN statement.
The unbalanced usage of GOSUB and RETURN causes a Stack error.
GOSUB and RETURN can carry some value using with _VAR statement.

When GOSUB_NE is used in stead of GOSUB, The MPC-2000 does not cause unknown label error .
When the label is unknown , it skip GOSUB_NE statement.




10 GOSUB *CAL 300 400
20 _VAR RES
30 PR RES
40 END
50 *CAL
60 _VAR V_ W_
70 RETURN SQR(SQ(W_)+SQ(V_))
RUN

*
Compiling
---------------------
500
#
[LASTMODIFY]2011-03-09 10:36:43 [CREATEDATE]2007-07-23 18:29:49
MPC2000 Reference Manual -R5.11-   (C)2007 ACCEL Corp. all right reserved.