While / exit while, If / then / else – BrightSign BrightScript 3.0 Reference Manual User Manual

Page 45

Advertising
background image

40

For each n in aa
Print n;aa[n]
aa.delete[n]
end for

WHILE / EXIT WHILE

WHILE expression / EXIT WHILE


A

WHILE loop executes until the specified expression is false. Use the EXIT WHILE statement to exit a WHILE block

prematurely.

Example:
k=0
while k<>0
k=1
Print "loop once"
end while


while true
Print "loop once"
Exit while
End while

IF / THEN / ELSE

IF expression THEN statements [ELSE statements]

Advertising