Libraries
Idxarray Source Code
 previous   up   next 

Abstract data types
type
array [ (in type: indexType) ] (in type: baseType)
Abstract data type, describing resizable arrays with indexType index.

array [

const func type: array [ (in type: indexType) ] (in type: baseType)

Abstract data type, describing resizable arrays with indexType index.


Operator Summary
void
(inout arrayType: arr) &:= (in arrayType: extension)
Append the array extension to the array arr.
void
(inout arrayType: arr) &:= (in baseType: element)
Append the given element to the array arr.
arrayType
(in arrayType: arr1) & (in arrayType: arr2)
Concatenate two arrays.
baseType
(in arrayType: an_array) [ (in indexType: index) ]
Access one element from the array an_array.
arrayType
(in arrayType: an_array) [ (in indexType: start) .. ]
Get a sub array beginning at the position start.
arrayType
(in arrayType: an_array) [ .. (in indexType: stop) ]
Get a sub array ending at the position stop.
arrayType
(in arrayType: an_array) [ (in indexType: start) .. (in indexType: stop) ]
Get a sub array from the position start to the position stop.
arrayType
(in arrayType: an_array) [ (in indexType: start) len (in indexType: stop) ]
Get a sub array from the position start with maximum length len.

Function Summary
integer
length (in arrayType: arr)
Determine the length of the array arr.
integer
minIntIdx (in arrayType: arr)
Minimum index of array arr converted to integer.
integer
maxIntIdx (in arrayType: arr)
Maximum index of array arr converted to integer.
indexType
minIdx (in arrayType: arr)
Minimum index of array arr.
indexType
maxIdx (in arrayType: arr)
Maximum index of array arr.
void
for (inout baseType: forVar) range (in arrayType: arr) do (in proc: statements) end for
For-loop where forVar loops over the elements of the array arr.
void
for key (inout indexType: keyVar) range (in arrayType: arr) do (in proc: statements) end for
For-loop where keyVar loops over the indices of the array arr.
void
for (inout baseType: forVar) key (inout indexType: keyVar) range (in arrayType: arr) do (in proc: statements) end for
For-loop where forVar and keyVar' loop over the array arr''.

Operator Detail

&:=

const proc: (inout arrayType: arr) &:= (in arrayType: extension)

Append the array extension to the array arr.

Raises:
MEMORY_ERROR - Not enough memory for the concatenated array.

&:=

const proc: (inout arrayType: arr) &:= (in baseType: element)

Append the given element to the array arr.

Raises:
MEMORY_ERROR - Not enough memory for the concatenated array.

&

const func arrayType: (in arrayType: arr1) & (in arrayType: arr2)

Concatenate two arrays.

Returns:
the result of the concatenation.

[

const func baseType: (in arrayType: an_array) [ (in indexType: index) ]

Access one element from the array an_array.

Returns:
the element with the specified index from an_array.
Raises:
INDEX_ERROR - If index is less than minIdx(an_array) or greater than maxIdx(an_array)

[

const func arrayType: (in arrayType: an_array) [ (in indexType: start) .. ]

Get a sub array beginning at the position start.

Returns:
the sub array beginning at the start position.
Raises:
MEMORY_ERROR - Not enough memory to represent the result.

[ ..

const func arrayType: (in arrayType: an_array) [ .. (in indexType: stop) ]

Get a sub array ending at the position stop.

Returns:
the sub array ending at the stop position.
Raises:
MEMORY_ERROR - Not enough memory to represent the result.

[

const func arrayType: (in arrayType: an_array) [ (in indexType: start) .. (in indexType: stop) ]

Get a sub array from the position start to the position stop.

Returns:
the sub array from position start to stop.
Raises:
MEMORY_ERROR - Not enough memory to represent the result.

[

const func arrayType: (in arrayType: an_array) [ (in indexType: start) len (in indexType: stop) ]

Get a sub array from the position start with maximum length len.

Returns:
the sub array from position start with maximum length len.
Raises:
MEMORY_ERROR - Not enough memory to represent the result.

Function Detail

length

const func integer: length (in arrayType: arr)

Determine the length of the array arr.

length(['a'] (1, 2, 3))  returns  3
Returns:
the length of the array.

minIntIdx

const func integer: minIntIdx (in arrayType: arr)

Minimum index of array arr converted to integer.

minIntIdx(['a'] (1, 2, 3))  returns  97
Returns:
the minimum index of the array converted to integer.

maxIntIdx

const func integer: maxIntIdx (in arrayType: arr)

Maximum index of array arr converted to integer.

maxIntIdx(['a'] (1, 2, 3))  returns  99
Returns:
the maximum index of the array converted to integer.

minIdx

const func indexType: minIdx (in arrayType: arr)

Minimum index of array arr.

minIdx(['a'] (1, 2, 3))  returns  'a'
Returns:
the minimum index of the array.

maxIdx

const func indexType: maxIdx (in arrayType: arr)

Maximum index of array arr.

maxIdx(['a'] (1, 2, 3))  returns  'c'
Returns:
the maximum index of the array.

for

const proc: for (inout baseType: forVar) range (in arrayType: arr) do (in proc: statements) end for

For-loop where forVar loops over the elements of the array arr.


for key

const proc: for key (inout indexType: keyVar) range (in arrayType: arr) do (in proc: statements) end for

For-loop where keyVar loops over the indices of the array arr.


for

const proc: for (inout baseType: forVar) key (inout indexType: keyVar) range (in arrayType: arr) do (in proc: statements) end for

For-loop where forVar and keyVar' loop over the array arr''.



 previous   up   next