Libraries
Fixed size array Source Code
 previous   up   next 

Abstract data types
type
array [ (in integer: minIdx) .. (in integer: maxIdx) ] (in type: baseType)
Abstract data type, describing fixed size arrays with integer index.
type
array [ (in integer: maxIdx) ] (in type: baseType)
Abstract data type for fixed size arrays with minimum index of 1.

array [

const func type: array [ (in integer: minIdx) .. (in integer: maxIdx) ] (in type: baseType)

Abstract data type, describing fixed size arrays with integer index. A fixed size array type defines the minimum and maximum allowed indices. All arrays declared with this type have the same length and the same minimum and maximum indices. All abstract fixed size array types are incompatible to each other. A type declaration is needed to use the same fixed size array type at several places. E.g.:

 const type: dataBlockType is array [1 .. 64] integer;

afterwards dataBlockType can be used in declarations. E.g.:

 var dataBlockType: aDataBlock is dataBlockType.value;
Parameters:
minIdx - Minimum index of the array type.
maxIdx - Maximum index of the array type.
baseType - Type of the array elements.

array [

const func type: array [ (in integer: maxIdx) ] (in type: baseType)

Abstract data type for fixed size arrays with minimum index of 1. A fixed size array type defines the minimum and maximum allowed indices. All arrays declared with this type have the same length and the same minimum and maximum indices. All abstract fixed size array types are incompatible to each other. A type declaration is needed to use the same fixed size array type at several places. E.g.:

 const type: dataBlockType is array [64] integer;

afterwards dataBlockType can be used in declarations. E.g.:

 var dataBlockType: aDataBlock is dataBlockType.value;
Parameters:
maxIdx - Maximum index of the array type.
baseType - Type of the array elements.

Operator Summary
arrayType
(attr arrayType) times (in baseType: element)
Generate an arrayType array filled with elements.
baseType
(in arrayType: arr) [ (in integer: index) ]
Access one element from the fixed size array arr.

Function Summary
integer
length (attr arrayType)
Length of all arrays declared with arrayType.
integer
minIdx (attr arrayType)
Minimum index of all arrays declared with arrayType.
integer
maxIdx (attr arrayType)
Maximum index of all arrays declared with arrayType.
integer
length (in arrayType: arr)
Length of the array arr.
integer
minIdx (in arrayType: arr)
Minimum index of array arr.
integer
maxIdx (in arrayType: arr)
Maximum index of array arr.

Operator Detail

times

const func arrayType: (attr arrayType) times (in baseType: element)

Generate an arrayType array filled with elements.

Returns:
a fixed size array filled with elements.
Raises:
MEMORY_ERROR - Not enough memory to represent the result.

[

const func baseType: (in arrayType: arr) [ (in integer: index) ]

Access one element from the fixed size array arr.

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

Function Detail

length

const integer: length (attr arrayType)

Length of all arrays declared with arrayType. All arrays declared with arrayType have this length.

Returns:
the length of the array.

minIdx

const integer: minIdx (attr arrayType)

Minimum index of all arrays declared with arrayType. All arrays declared with arrayType have this minimum index.

Returns:
the length of the array.

maxIdx

const integer: maxIdx (attr arrayType)

Maximum index of all arrays declared with arrayType. All arrays declared with arrayType have this maximum index.

Returns:
the length of the array.

length

const integer: length (in arrayType: arr)

Length of the array arr. The length of a fixed size array does not depend on the value.

Returns:
the length of the array.

minIdx

const integer: minIdx (in arrayType: arr)

Minimum index of array arr. The minimum index of a fixed size array does not depend on the value.

Returns:
the minimum index of the array.

maxIdx

const integer: maxIdx (in arrayType: arr)

Maximum index of array arr. The maximum index of a fixed size array does not depend on the value.

Returns:
the maximum index of the array.


 previous   up   next