gloop { <elist> ... } {
<command_block>
}
Execute a set of commands on selected graphic primitives.
<elist>
A group/entity list
defining which entities are to be processed. If omitted, the contents
of the all group are processed.
-ef=<filter>
A filter to be applied to all entities within <elist>,
further qualifying which entities are to be processed. If omitted, the
filter current_filter is used.
The command block will be executed for each graphic primitive within <elist>. During each pass of the loop the system epointer this may be used to reference the relevant primitive.
A jump to the end of the loop may be made with the continue command.
Before execution of the command block, the entity list is checked to remove any entities which have null values, and multiple occurrences of the same graphic primitive.
A break out of the loop may be made with a break command. However when an exit is made from the loop then this reverts to the value it had at the beginning of the loop command, unless that value was null. This facilitates nested gloops.
Print the names and types of all primitives.
gloop {
tell <this.gtype, ':', this.name>
}
Get the maximum radius of all circles in a group.
numeric radius
gloop group_a,-ef=circle_filter {
radius = max(radius,this.radius)
}
|
Commands: |
|
|
Identifiers: |
all (group), current_filter (filter), this (epointer) |