Difference between revisions of "Introduction to OBSE arrays"

75 bytes removed ,  06:49, 29 December 2013
m
→‎Declaring and initializing arrays: Formatting has been messed up. Fixed.
imported>8asrun6aer
m (Just displaying the toc for easier navigation)
imported>QQuix
m (→‎Declaring and initializing arrays: Formatting has been messed up. Fixed.)
Line 168: Line 168:
1. Explicitly initializing it using ar_Construct
1. Explicitly initializing it using ar_Construct
::When initializing an array with ar_Construct, the type of array must be provided as the argument:
::When initializing an array with ar_Construct, the type of array must be provided as the argument:
 
:::let MyArray := ar_Construct array
<dl><dd><dl><dd>
:::let MyArray := ar_Construct map
let MyArray := ar_Construct array
:::let MyArray := ar_Construct stringmap
let MyArray := ar_Construct map
let MyArray := ar_Construct stringmap
</dl></dl>




2. Assigning the value of another array_var to it
2. Assigning the value of another array_var to it
:: In this case MyArray will be of the same type of SomeArray (actually, both refer to the same array)
:: In this case MyArray will be of the same type of SomeArray (actually, both refer to the same array)
<dl><dd><dl><dd>
:::let SomeArray := ar_Construct array
let SomeArray := ar_Construct array
:::Let MyArray := SomeArray
Let MyArray := SomeArray
 
</dl></dl>




3. Assigning it the return value of a command returning an array such as GetItems.  
3. Assigning it the return value of a command returning an array such as GetItems.  
<dl><dd><dl><dd>
::Let MyArray := GetItems
Let MyArray := GetItems
</dl></dl>
 
 


==Populating arrays==
==Populating arrays==
Anonymous user