7.5

Table Of Contents
Category: Description:
Functions
A function performs an action and returns a value. For example the inttostr function converts an integer to a
string, and returns the value of the resulting string. A function thus has a data type that corresponds to that of the
value it returns. You assign the result of a function to a variable or use it as an argument in another command.
Most functions require arguments. For example the inttostr command requires a single argument: the integer
you want to convert to a string; it returns a string and thus the inttostr function is of type string.
Loop struc-
tures
Repeat a sequence of one or more commands until a specified condition is met. See "Loop Structures" (page n).
Condition
structures
Control when a sequence of one or more commands executes. See "Condition Structures" (page n).
Comments
Provide a means for embedding documentation in your code, or for commenting out lines of code during debug-
ging. See "% (procedure)" (page 566).
PlanetPress Talk Syntax
What are the rules for creating PlanetPress Talk scripts?
The rules, or syntax, of the PlanetPress Talk language describe how you combine its elements to create scripts.
Command Syntax
A PlanetPress Talk command has the form:
command_name( arguments )
Arguments can be constants, variables, or functions (see "Use Functions as Arguments" (page 238)).
A command can require no arguments, or one or more arguments. When a command requires more than one argument, you
separate arguments by commas. The following are all examples of valid PlanetPress Talk commands:
fill()
moveto( 2.2, 4.5 )
mul(4.7,2.1)
rectangle(0,0,3,3,true,true)
curveto(1,1,1,3,0.5,2)
set(&current.line,&current.line + 1)
store(&current.line,trimleft(&str))
strtoint( @( 12,30,35) )
Spaces are not significant in PlanetPress Talk except between the name of a command and its opening parenthesis. An error
occurs if you leave a space between the name of a command and its opening parenthesis.
show('this syntax is correct')
show ('this syntax produces an error')
Comments
PlanetPress Talk allows the use of comments within the code. To enter an expression, simply enter a percentage sign (%) fol-
lowed by the text you want to comment.
Comments may only be used within a PlanetPress Talk object, or in the "PlanetPress Talk Before" and "PlanetPress Talk After"
sections of any object, and is not supported in PlanetPress Talk-enabled input boxes (for example, conditions and advanced
data selections).
Case
PlanetPress Talk is case insensitive. Thus the following commands are all equivalent:
©2010 Objectif Lune Inc - 220 -