Original Author Paul Laughton, 2011
Page 47
De Re BASIC!
List.get <pointer_nexp>, <index_nexp>, <var>
The list element specified by <index_nexp> in the list pointed to by <pointer_nexp> is returned in the
specified string or numeric variable <var>.
The index is one-based. The first element of the list is 1.
The return element variable type must match the list type (string or numeric).
List.type <pointer_nexp>, <svar>
The type of list pointed to by the list pointer is returned in the string variable <svar>.
Returns the upper case character "S" if the list is a list of strings.
Returns the upper case character "N" if the list is a list of numbers.
List.size <pointer_nexp>, <nvar>
The size of the list pointed to by the list pointer is returned in the numeric variable <nvar>.
List.clear <pointer_nexp>
Clears the list pointed to by the list pointer and sets the list's size to zero.
List.search <pointer_nexp>, value|value$, <result_nvar>{,<start_nexp>}
Searches the specified list for the specified string or numeric value. The position of the first (left-most)
occurrence is returned in the numeric variable <result_nvar>. If the value is not found in the list then the
result is zero.
If the optional start expression parameter is present, the search starts at the specified element. The
default start position is 1.
List.toArray <pointer_nexp>, Array$[] | Array[]
Copies the list pointed to by the list pointer into an array. The array type (string or numeric) must be the
same as the list type. If the array exists, it is overwritten, otherwise a new array is created. The result is
always a one-dimensional array.
Bundles
A Bundle is a group of values collected together into a single object. A bundle object may contain any
number of string and numeric values. There is no fixed limit on the size or number of bundles. You are
limited only by the memory of your device.
The values are set and accessed by keys. A key is string that identifies the value. For example, a bundle
might contain a person's first name and last name. The keys for accessing those name strings could be
"first_name" and "last_name". An age numeric value could also be placed in the Bundle using an "age"
key.
A new, empty bundle is created by using the Bundle.create command. The command returns a pointer
to the empty bundle. Because the bundle is represented by a pointer, bundles can be placed in lists and