fix syntax

pull/149/head
Dallas Winger 2022-09-20 00:29:16 -04:00 committed by GitHub
parent 01a1e87688
commit a0dbc8350f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,21 @@
REM Example Function FUNCTION COUNTDOWN() WHILE ($TIMER > 0) STRING . $TIMER = ($TIMER - 1) DELAY 500 END_WHILE END_FUNCTION STRING And then it happened VAR $TIMER = 3 COUNTDOWN() SPACE STRING a door opened to a world $TIMER = 5 COUNTDOWN()
REM Example Function
VAR $TIMER = 3
FUNCTION COUNTDOWN()
WHILE ($TIMER > 0)
STRING .
$TIMER = ($TIMER - 1)
DELAY 500
END_WHILE
END_FUNCTION
STRING And then it happened
COUNTDOWN()
SPACE
STRING a door opened to a world
$TIMER = 5
COUNTDOWN()
REM The FUNCTION command defines a new function named COUNTDOWN() containing a code block with a WHILE loop which types a single period (".") for each value of $TIMER.
REM The first time the COUNTDOWN() function is called, the $TIMER variable holds the value 3. The second time it is called, the $TIMER variable holds the value 5.
REM The string "And then it happened... a door opened to a world....." will be typed.
REM The string "And then it happened... a door opened to a world....." will be typed.