Libraries
Category Source Code
 previous   up   next 

Types
category
Describes the category of a reference.

category

const type: category

Describes the category of a reference.


Operator Summary
category
(attr category) . value
Default value of category (SYMBOLOBJECT).
boolean
(in category: cat1) = (in category: cat2)
Check if two category values are equal.
boolean
(in category: cat1) <> (in category: cat2)
Check if two category values are not equal.
category
(attr category) conv (in integer: number)
Convert an integer number to category.
category
(attr category) parse (in string: catName)
Convert a string to a category.

Function Summary
category
category (in string: catName)
Convert a string to a category.
integer
ord (in category: aCategory)
Determine the ordinal number of a category.
category
category (in integer: number)
Convert an integer number to category.
string
str (in category: aCategory)
Convert a category to a string.
void
for (inout category: forVar) range (in category: startValue) to (in category: endValue) do (in proc: statements) end for
Category for-loop, looping from startValue upward to endValue.
void
for (inout category: forVar) range (in category: startValue) downto (in category: endValue) do (in proc: statements) end for
Category for-loop, looping from startValue downward to endValue.

Operator Detail

. value

const category: (attr category) . value

Default value of category (SYMBOLOBJECT).


=

const func boolean: (in category: cat1) = (in category: cat2)

Check if two category values are equal.

Returns:
TRUE if both values are equal, FALSE otherwise.

<>

const func boolean: (in category: cat1) <> (in category: cat2)

Check if two category values are not equal.

Returns:
FALSE if both values are equal, TRUE otherwise.

conv

const func category: (attr category) conv (in integer: number)

Convert an integer number to category.

Returns:
the category result of the conversion.

parse

const func category: (attr category) parse (in string: catName)

Convert a string to a category.

Parameters:
catName - Name of a category to be converted.
Returns:
the category result fo the conversion.
Raises:
RANGE_ERROR - If there is no corresponding category.

Function Detail

category

const func category: category (in string: catName)

Convert a string to a category.

Parameters:
catName - Name of a category to be converted.
Returns:
the category result fo the conversion.
Raises:
RANGE_ERROR - If there is no corresponding category.

ord

const func integer: ord (in category: aCategory)

Determine the ordinal number of a category.

Returns:
a small integer which corresponds to aCategory.

category

const func category: category (in integer: number)

Convert an integer number to category.

Returns:
the category result of the conversion.

str

const func string: str (in category: aCategory)

Convert a category to a string.

Parameters:
aCategory - Category to be converted.
Returns:
the string result of the conversion.
Raises:
MEMORY_ERROR - Not enough memory to represent the result.

for

const proc: for (inout category: forVar) range (in category: startValue) to (in category: endValue) do (in proc: statements) end for

Category for-loop, looping from startValue upward to endValue. The variable forVar is initialized with startValue. The statements are executed repeatedly. After each repetition the variable forVar is incremented with forVar := category(succ(ord(forVar))). After the statements were executed with endValue the for-loop is terminated. If ord(startValue) is greater than ord(endValue) the statements are not executed at all.


for

const proc: for (inout category: forVar) range (in category: startValue) downto (in category: endValue) do (in proc: statements) end for

Category for-loop, looping from startValue downward to endValue. The variable forVar is initialized with startValue. The statements are executed repeatedly. After each repetition the variable forVar is decremented with forVar := category(pred(ord(forVar))). After the statements were executed with endValue the for-loop is terminated. If ord(startValue) is greater than ord(endValue) the statements are not executed at all.



 previous   up   next