set_reversible_attributes
set_reversible_attributes |
Purpose
Sets the attributes of a reversible number or array.
Synopsis
procedure set_reversible_attributes(revarray:cpreversiblearray, first:integer, last:integer, initValue:integer)
procedure set_reversible_attributes(rev:cpreversible, initValue:real)
Arguments
revarray
|
a reversible array
|
first
|
the smallest index number
|
last
|
the highest index number
|
rev
|
a reversible number
|
initValue
|
the initialization value
|
Example
The following example shows how to set the attributes of a reversible array :
declarations reva: cpreversiblearray end-declarations ! Create a reversible array of 10 elements initialized with value 0 set_reversible_attributes(reva, 1, 10, 0) ! Return the number of elements in the reversible array writeln("Array contains ", getsize(reva), " elements") ! Get the 5'th element of the array writeln("The 5'th element of reva is ", getelt(reva,5))
Related topics