7.6

Table Of Contents
Syntax
pos( string1, string2 ) integer value
Arguments
string1
String value to search for.
string2
String value in which to search.
Code Sample Example
This example uses POS to look for a word in a data selection.
Example
define(&s,string,@(1,10,40)) %Initialize var. with data
if(pos('INVOICE',&s)>0) %Look for the word INVOICE
show('Invoice') %if found, display some text
elseif()
%Otherwise,display something else
show('Sales order')
endif()
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)
©2010 Objectif Lune Inc - 500 -