6.0

Table Of Contents
96
Language Reference
4
startvalue — Integer value to initialize varname.
increment — Integer value used to increment varname after each iteration.
stopvalue — Integer value after which iterations stop.
Code Sample Example
This example simply prints 5 lines of text.
Note: To cycle backwards through values, make startvalue larger than stopvalue, and specify a negative
increment.
Example
define(&x,integer,1)
for(&x,1,1,5)
show('Line nº '+inttostr(&x))
crlf()
endfor()
Function @name (procedure)
Defines a new PlanetPress Talk function or procedure. If you define a function that you want to return a
value, you assign that value to the predefined variable &result on the last line of the function definition.
You call the function or procedure you define using the @name() command. See “@name (function/
procedure)” on page 63.
You can reference a global function from within another global function only if the global function you are
referencing already exists.
Syntax
Syntax for a function that returns a value:
function @name( arglist ): type
...
&result := return_value
endfunction()
Syntax for a function that does not return a value: