General routinesIntegersHow to build an INTEGERobjectParticular routines for INTEGERobjects

Particular routines for INTEGERobjects

The make, select, change, build routines are the basic routines, let us now look at some particular ones: The following routine allows to evaluate the number of digits: For the generation of random INTEGERobjects, look at the following codefragment:
...
INT i;
...
scan(INTEGER,upper);
scan(INTEGER,lower);
for (i=0L;i<1000L;i++)
{
random_integer(result,lower,upper);
println(result);freeself(result);
}
...
which prints 1000 random numbers between the upper and lower bound. Because this is a lowlevel routine, you have to free the result object, before you call the routine. The description of this routine for the generation of random integers reads as follows: There is also a routine for testing the implementation of INTEGERobjects:
harald.fripertinger@kfunigraz.ac.at,
last changed: November 19, 2001

General routinesIntegersHow to build an INTEGERobjectParticular routines for INTEGERobjects