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,4 +1,20 @@
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.