7.4

Table Of Contents
Random (function)
Returns a measure value between 0 and 1, non-inclusive. Since this function uses the current system time when run inside the
printer, it returns a true random value. On the computer, however, the function uses the current data page as its seed to
ensure the returned value is constant when you navigate from page to page on your document.
Syntax
random() measure value
Argument
None
Code Sample Example
This example displays 10 random numbers between 1 and 20.
Example
define(&x,integer,1)
for(&x,1,1,10)
show(inttostr(floattoint(random()*20)+1))
crlf()
endfor()
Ceil (function)
Returns the smallest integer greater than or equal to the specified measure value.
Syntax
ceil( value ) integer value
Argument
value
Measure value. The absolute value of the measure value must be less than the maximum value of an integer in PostScript
(2,147,483,647).
Code Sample Examples
These examples illustrate various applications of ceil().
ceil( -2.8 ) %Returns -2
ceil( 2.8 ) %Returns 3
ceil( -5.0 ) %Returns -5
©2010 Objectif Lune Inc - 386 -