6.0

Table Of Contents
48
PlanetPress Talk Summary
3
Loop and Condition Structures
Loop Structures
Condition Structures
Name: Type: Description:
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.
Repeat
...
Until
procedure Repeat a sequence of commands until a condition is true. It is similar to
a for... endfor loop in that you can nest the loops. It is different from a
for... endfor loop in that the loop always executes at least once, and
that you tie the number of times the loop repeats to a Boolean
condition. For example you might tie the number of times the loop
repeats to the occurrence of a piece of data in the data stream.
Search
...
EndSearch
procedure This command structure allows a series of nested commands to be
repeated as long as a specific string of characters (the search string) is
found within another string (the target string). After each iteration, the
target string contains all the data between occurrences of the search
string, excluding the search string. Once the loop is over, target contains
the remaining characters of the original data.
Exit
procedure Exits from a for...endfor or repeat...until loop.
Name: Type: Description:
If
function Evaluates an expression and returns one of two specified values
according to the results of the evaluation.
If
...
ElseIf
...
EndIf
procedure This command structure can define up to two conditional blocks.
Statements nested within the first block are executed only if the
condition specified in the if statement returns true. If it returns false, the
program branches to the first statement in the second block, if one has
been defined using the elseif statement. Otherwise, control flows to the
first statement following the endif command.