"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
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
From the old Brightscript Reference 3.0 PDF, this seems to have been left out of the on-line version:
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.