-
Notifications
You must be signed in to change notification settings - Fork 2
_FOR
FOR <variable> = <from> TO <to> [STEP <step>]
NEXT <variable>
This code is rather self explaining. A variable will contain the value , up to . It is possible to set a step size using STEP. If you want a loop with descending values, the value must be negative e.g. "STEP -1".
NEW
10 FOR A = 1 TO 10
20 PRINT A
30 NEXT A
40 FOR A = 10 TO 1 STEP -1
50 PRINT A
60 NEXT A
RUN
The above example outputs the numbers 1 to 10 and 10 to 1.
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