Libraries |
|
Idxarray | Source Code |
|
|
Abstract data types | |||||
type |
|
array [
const func type: array [ (in type: indexType) ] (in type: baseType)
-
Abstract data type, describing resizable arrays with indexType index.
Operator Summary | |||||
void |
| ||||
void |
| ||||
arrayType |
| ||||
baseType |
| ||||
arrayType |
| ||||
arrayType |
| ||||
arrayType |
| ||||
arrayType |
|
Function Summary | |||||
integer |
| ||||
integer |
| ||||
integer |
| ||||
indexType |
| ||||
indexType |
| ||||
void |
| ||||
void |
| ||||
void |
|
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) ]
[
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)
maxIntIdx
const func integer: maxIntIdx (in arrayType: arr)
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''.
|
|