' These are samples for Array object and arrays.
' Program ID JSM615-1
' To set value to array
shape["shape"] = "Rectangle" ' set value
shape["color"] = "Lime" ' set value
TextWindow.WriteLine(shape) ' shape=Rectangle;color=Lime;
' To get value from array
shape["color"] = "Lime" ' set value
color = shape["color"] ' get value
TextWindow.WriteLine(color) ' Lime
' To remove value from array
shape["shape"] = "Rectangle" ' set value
shape["color"] = "Lime" ' set value
shape["color"] = "" ' remove value
TextWindow.WriteLine(shape) ' shape=Rectangle;
' ContainsIndex operation
param["x"] = 200
param["y"] = 100
If Array.ContainsIndex(param, "x") Then
TextWindow.WriteLine(param["x"]) ' 200
EndIf
' ContainsValue operation
param["x"] = 200
param["y"] = 100
If Array.ContainsValue(param, 100) Then
TextWindow.WriteLine("Array param has value 100.") ' True
EndIf