Libraries |
|
Struct element | Source Code |
|
|
Types | ||||
| ||||
|
Abstract data types | |||||
type |
|
getType
const func type: getType (in structElement: anElement)
-
Get the type of a structElement.
getType(elements(rational)[1]) returns integer getType(elements(null_file)[1]) returns char getType(structElement.value) raises RANGE_ERROR
- Returns:
- the type of the given structElement.
Operator Summary | |||||
boolean |
| ||||
boolean |
| ||||
f_param |
|
Function Summary | |||||
structElement |
| ||||
integer |
| ||||
integer |
| ||||
string |
| ||||
structElementArray |
|
Operator Detail |
=
const func boolean: (in structElement: elem1) = (in structElement: elem2)
-
Check if two structElement values are equal.
- Returns:
- TRUE if both values are equal, FALSE otherwise.
<>
const func boolean: (in structElement: elem1) <> (in structElement: elem2)
-
Check if two structElement values are not equal.
- Returns:
- FALSE if both values are equal, TRUE otherwise.
symb
const func f_param: symb (in structElement: anElement)
-
Convert a structElement into a symbol parameter. This can be used to declare a function for a specific struct element:
const func string: toJson (in dataType: dataStruct, symb anElement) is return toJson(dataStruct.element);
- Returns:
- a symbol parameter which corresponds to the given structElement.
Function Detail |
structElement
const func structElement: structElement (in reference: aReference)
-
Convert a reference to a structElement.
- Returns:
- the result of the conversion.
compare
const func integer: compare (in structElement: elem1, in structElement: elem2)
-
Compare two structElement values.
- Returns:
- -1, 0 or 1 if the first argument is considered to be respectively less than, equal to, or greater than the second.
hashCode
const func integer: hashCode (in structElement: anElement)
-
Compute the hash value of a structElement.
- Returns:
- the hash value.
getName
const func string: getName (in structElement: anElement)
-
Get the name of a structElement.
getName(elements(rational)[1]) returns "numerator" getName(elements(rational)[2]) returns "denominator" getName(elements(null_file)[1]) returns "bufferChar"
- Returns:
- the the name of the given structElement.
elements
const func structElementArray: elements (in type: aType)
-
Get all struct elements from the given struct type aType.
- Returns:
- an array structElement describing all elements of the struct.
- Raises:
- ILLEGAL_ACTION - The type aType is not a struct type.
|
|