"3.1 Identifiers" wrote:
* may not use a "reserved word" as the name (see appendix for list of reserved words).
IF = IF THEN > ELSE THEN THEN ELSE ELSE FIcan be a valid statement and meaning is determined by context. But in most languages that is not the case, BASIC included (which bright script is dialect of).
Appendix C - Reserved Words
END, LET, PRINT, IF, ELSE, ENDIF, THEN, GOTO, FOR, TO, STEP,
NEXT, RETURN, DIM, NOT, AND, OR, TAB, STOP, OBJFUN, TYPE,
TRUE, FALSE, CREATEOBJECT, WHILE, ENDWHILE, EXITWHILE, EACH, EXIT,
INVALID, ENDFUNCTION, ENDSUB, ELSEIF, REM, LINE_NUM, SUB, FUNCTION
58
Reserved Words
INVALID FOR POS
AND PRINT LINE_NUM
OR GOTO REM
EACH IF RETURN
NEXT NOT STEP
DIM THEN STOP
ELSE TO TAB
END TAB OBJFUN
TYPE RND TRUE
FALSE CREATEOBJECT WHILE
ENDWHILE EXITWHILE ENDSUB
SUB FUNCTION EACH
EXIT ENDFUNCTION ENDIF
"RokuJoel" wrote:
From the old Brightscript Reference 3.0 PDF, this seems to have been left out of the on-line version:
"RokuRobB" wrote:
The BrightScript reserved word list is now on the Wiki in the BrightScript Language Reference, section 10. http://sdkdocs.roku.com/display/sdkdoc/ ... ervedWords
Thanks for pointing out that this was missing.
AND[/spoiler:k3yd2eks]
CREATEOBJECT
DIM
EACH
ELSE
ELSEIF
END
ENDFUNCTION
ENDIF
ENDSUB
ENDWHILE
EXIT
EXITWHILE
FALSE
FOR
FUNCTION
GOTO
IF
INVALID
LET
LINE_NUM
NEXT
NOT
OBJFUN
OR
POS
REM
RETURN
STEP
STOP
SUB
TAB
THEN
TO
TRUE
TYPE
WHILE