ArborX


{

Longname: {   Open the Documentation Legend
Released: not available 
Created: not available 
Last modified: 5.54a 
See also: } : <?{> <?}> <?:>

Summary
The { jump macro is used for jumping backwards in a script, the opposite of }. It works by transferring control to the first occurrence in the script of the target :. Execution of the script then continues from the next line. It can also be used to jump forward, but only if there are no previous occurrences of the label.
Example extract

For example, if a certain section of a script had to be re-executed a number of times (looped), a similar layout to below could be used. The '...script action(s)...' section would also contain your exit condition(s):

 :repeat_this 1
 ...script action(s)... 2
 {repeat_this 3

Syntax (X.XX)
name:b The target :labels name. Any sequence of characters preceded by a { character. Jump macros must appear on a line by themselves unless they are part of a ?.

Label and jump macros are only available within scripts executed with trun. They are only seen by the script processor, not the normal macro processor. The only place where this might cause confusion is in macro files executed with run.

Example

In addition to this, jump labels can use variables to provide a type of 'conditional goto', e.g.:

 {label_^var^
Example

This example illustrates the multiple combined uses of scripting loops labels and jumps in a small script that resets values of a set of variable arrays, (see also Variables).

 ^max_param=10 1
 ^param_array_incr=0 2
 :set_param_vars 3
 ^param_array_incr++ 4
 ?=^(^param_array_incr),^(^max_param) }exit_set_param_vars 5
 ^assd_com(^param_array_incr)= 6
 ^group_type(^param_array_incr)= 7
 ^param_nm(^param_array_incr)= 8
 ^param_typc(^param_array_incr)= 9
 ^param_descript(^param_array_incr)= 10
 {set_param_vars 11
 :exit_set_param_vars 12

Document created on 08-Feb-2003 (revision 1)