ArborX


<?{>

Longname:   Open the Documentation Legend
Released: 4.55a 
Created: 4.55a 
Last modified: 5.54a 
See also: <?}> <?:> { <?-> <?attr>

Summary
This command along with its sister commands <?}> & <?:>, allow movement within tags with gotos and labels, similar to the commands for moving around in scripts. Enables you to repeat commands or attributes, but can also be used to conditionally test text.
Example extract

The following syntax simply jumps over the plain text within this tag. This is not of much practical use but illustrates the basics of how jumps work.

Tx Body: 0(34)c

<?}chris> This is some descriptive text <?:chris>


Syntax (X.XX)
name or test:b The command can take a number of different name generating syntax to point to a corresponding label.
name or test:b
name  The name for these commands is at the users discretion with the usual constraints on characters.
Version specific information7.01 
From 3B2 version 7.01 there is no limit to the number of characters used for a jump or labels name. Prior to this the limit is 31 characters.
name or test:b
test  This can be one of, or a combination of showstrings, including using elements attribute values and X counter tests.
Example

The following example will manipulate a text stream of capital letters so that any characters apart from the first of the word is in small capitals. It calls out a word space, re-inserts it with cap height, skips one character, inserts the small caps height, then jumps back to the label.

Tx Body: 0(112)c

<?th=14pt><?tlb=1.2*h><?0,1,0,0,0,1,0,0,0,0,5>
<?char><?th=9pt>
<?:loop><#,32>
<?th=14pt><?char>
<?th=10pt><?{loop>

Note that a failed hash callout will exit a style.
Example

The example below tests the current value of the counter 99 to decide on what attributes to assign to the <Body> tag.

If the counter x99 is 1, then jump to the label <?:red>, or if 2 jump to <?:blue>.

Tx Body: 0(96)c

<?}=1?x(99)red><?}=2?x(99)blue><?->
<?:red><?th=12pt><?tic=red><?->
<?:blue><?th=8pt><?tic=Blue><?->

Note the <?-> command following the second jump test to exit the tag if neither of the jump commands are executed, (i.e. if x99 is not 1 or 2). Also located at the end of each label entry.
Example

This test will simply jump to the label corresponding with the current counter value, whereas above, the label name was indicated.

Tx Body: 0(96)c

<?}style_$x(99)><?->
<?:style_1><?th=12pt><?tic=red><?->
<?:style_2><?th=8pt><?tic=Blue><?->

The target label is allowed to be blank or it can point to a non-existent label (in which case the 'goto' command is ignored). This can be useful with conditional show strings. For example, if the counter 'a' contains the value 1, which indicates that a portion of the tag should be skipped, then the following could be used:

Example

If 'a' is not equal to 1 then the show string does not generate any text and so the target label is blank, causing the 'goto' command to be ignored.

 <?}=1?name>skip this text if a=1<?:label>continue here
It is possible to set up continuous loops within a style. This is acceptable as long as a condition changes within the loop which will allow the loop to terminate. It is extremely easy to cause 3B2 to crash if loops are set up incorrectly. Consider the following:
 <?:label_1><?{label_1>

If 3B2 tries to format these commands, it will crash immediately as there is no exit condition for the loop. see <?->

Example

A further example of this command's use is primarily used with SGML/XML type attribute tags. Strictly speaking a show string, this will jump to the label name set by the value of the 'role' attribute, in this case "default".

Tx Body: 0(96)c

<?}$^role#^><?->
<?:default><?th=10pt><?tf="Times"><?->
<?:second><?th=10pt><?tf="Times">&#131;<?->
<?:example><?th=9pt><?tf="Arial"><?->

A further example of this can be seen with the command and conditional processing of show strings within attribute tags is discussed under the & command.
A further example of this can be seen with the <?attr> command and conditional processing of show strings within attribute tags. This is discussed under the <?showifdef> & <?showifnum> command.

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