7.4

Table Of Contents
Syntax
strtoint( string ) integer value
Argument
string
String value to convert.
Code Sample Example
This example reads a column of 6 values then converts the values to integers and then adds the integer to the &total variable.
The total value is subsequently converted back to a string and the result is printed.
Example
define(&total,integer,0)
define(&x,integer,0)
for(&x,1,1,6)
set(&total,&total+strtoint(@(&x,10,18)))
endfor()
show(inttostr(&total))
Loop Structures
For EndFor (procedure)
This command structure allows a series of nested commands to be repeated a specified number of times. Each for statement
must have a corresponding endfor statement in order for PlanetPress Talk to know which commands to include in the loop.
Note that you cannot increment the counter for a for() loop, inside the loop.
If you open a document created a with a version of PlanetPress earlier than 5.2.0, and if that document includes a for() loop
with an increment greater than 1, you will notice that the loop is executed one less time than with your older version software
both in PlanetPress itself and when you use the Optimized PostScript Stream option. The behavior on printers (using the Printer
Centric option), on the other hand, remains unchanged.
Syntax
for( varname, startvalue, increment, stopvalue )
endfor()
Arguments
varname
©2010 Objectif Lune Inc - 399 -