beautypg.com

Statement summary – BrightSign BrightScript 2 Reference Guide User Manual

Page 6

background image

6

Statement Summary

BrightScript supports the following familiar looking statement types:

If / Then / Else If / Else / End If

For / To / Next / Step / Exit For

For Each / In / Next / Exit For

While / End While / Exit While

Function / End Function / As / Return

Sub / End Sub

Print

Rem (or „)

Goto

Dim

End

Stop


BrightScript is not case sensitive.

Each statement‟s syntax is documented precisely later in the manual.

Here is an example:

Function Main() As Void

dim cavemen[10]

cavemen.push("fred")
cavemen.push("barney")
cavemen.push("wilma")
cavemen.push("betty")

for each caveman in cavemen
print caveman
next

End Function


Each line may contain a single statement, or a colon (:) may be used to separate multiple
statements on a single line.

myname = “fred”
if myname=”fred” then yourname = “barney”:print yourname