BrightSign HD2000 BrightScript Reference Guide User Manual
Page 13

13
To re-dimension an array, you must first use a CLEAR statement
LET variable = expression
May be used when assigning values to variables. Roku BrightScript does not require LET with assignment
statements, but you can use it if you wish.
Examples:
LET A$="A ROSE IS A ROSE"
LET B1=1.23
LET X=X-Z1
In each case, the variable on the left side of the equals sign is assigned the value of the constant or expression
on the right side.
END
Terminates execution normally.
Example:
10 INPUT S1,S2
20 GOSUB 100
.
.
.
99 END
100 H=SQR(S1*S1+S2*S2)
110 RETURN
The END statement in line 99 prevents program control from "crashing" into the subroutine. Now line 100
can only be accessed by a branching statement such as 20 GOSUB 100.
STOP
Interrupts execution and prints a BREAK IN line number message. STOP is primarily a debugging aid.
GOTO line number or label or run-time variable
Transfers program control to the specified line number. GOTO line number/label/run-time variable results
in an unconditional (or automatic) branch.
GOSUB line number or label or run-time variable
Transfers program control to the subroutine beginning at the specified line number and stores an address to
RETURN to after the subroutine is complete. When the Interpreter encounters a RETURN statement in the
subroutine, it will then return control to the statement, which follows GOSUB.
Example:
GOSUB ["king"]
a$="queen"
GOTO [a$]
PRINT "ERROR!":STOP
king:
PRINT "king!"