BrightSign BrightScript 3.0 Reference Manual User Manual
Page 37

32
Example: The first statement will include a library in the same folder as the script, while the second will include a library in
a sub-folder.
LIBRARY "myBSL1.brs"
LIBRARY "new_lib/myBSL2.brs"
Example: The following statement will include the
library, which has some useful BrightScript features, from
the
SYS:/script-lib/ directory.
LIBRARY "v30/bslCore.brs"
DIM
DIM Name (dim1, dim2, …, dimK)
The
DIM (“dimension”) statement provides a shortcut for creating roArray objects. It sets the variable Name to type
“roArray”. It can create arrays of arrays as needed for multi-dimensionality. The dimension passed to
DIM is the index of
the maximum entry to be allocated (i.e. the array initial size = dimension+1), though the array will be resized larger
automatically if needed.
Example: The following two lines create identical arrays.
Dim array[5]
array = CreateObject(“roArray”, 6, true)
Note: The expression x[a,b] is identical to x[a][b].
Example: The following script demonstrates useful operations on a
DIM array.
Dim c[5, 4, 6]