-
Notifications
You must be signed in to change notification settings - Fork 2
_GOSUB
GOSUB <line number>
RETURN
The GOSUB command can be used to jump to another line in the program and runs until the next RETURN statement. This command can be used to emulate a function and is usefull if some code needs to be used more than once.
If an array is defined (using DIM) in a Subroutine, the array will only exist for the duration of the subroutine.
NEW
10 A = 0
20 GOSUB 100
30 GOSUB 100
40 GOSUB 100
40 GOSUB 100
40 GOSUB 100
50 PRINT A
60 END
100 A = A + 1
110 RETURN
RUN
Above example should print "5"
FOR
IF
GOSUB
DIM
LIST
MEM -
NEW
RUN
END
GOTO
REM
PRINT
REBOOT
RETURN
AUTORUN
CONFIG -
ABS
LEN !
RND
+
-
*
/
%
&
|
^
>
>=
<
<=
=
==
!=
<<
>>
//
TIMER
MILLIS -
DELAY
PINMODE
RISING -
FALLING -
INTERRUPT -
ATTACH -
DETACH -
SERIAL
SPI
ANALOG
I2C
WIRE
TIMEOUT -
WAIT -
PULSE -
BATTERY
GATT
WRITENORSP -
NOTIFY -
INDICATE -
GATT ONREAD -
GATT ONWRITE -
GATT ONCONNECT
GATT ONDISCOVER -
ADVERT
SCAN
ACTIVE -
DUPLICATES -
BTPOKE
BTPEEK