Equals operator – BrightSign BrightScript 3.0 Reference Manual User Manual

Page 18

Advertising
background image

13


array=CreateObject("roArray", 10, true)
array[2]="two"
print array[2]

fivevar=five
print fivevar()

array[1]=fivevar
print array[1]() ' print 5

function five() As Integer
return 5
end function

Array Dimensions
Arrays in BrightScript are one dimensional. Multi-dimensional arrays are implemented as arrays of arrays. The

[]

operator will automatically map multi-dimensionality. For example, the following two fetching expressions are the same:
dim array[5,5,5]
item = array[1][2][3]
item = array[1,2,3]

Note: If a multi-dimensional array grows beyond its hint size, the new entries are not automatically set to roArray.

Equals Operator

The

= operator is used for both assignment and comparison:

Advertising