Macro Language Reference > PIs > Formatting Instructions > {
  
{
Description
This command, along with its sister commands <?}> and <?:>, allow movement within tags with gotos and labels, similar to the commands for moving around in scripts. It enables you to repeat commands or attributes or conditionally test text.
 
Example 372. Use jumps to capitalize first letters of words
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. The code calls out a word space, reinserts it with a cap height instruction, skips one character, inserts the small caps height, then jumps back to the label.
<?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.
Syntax
<?{ name or test:b>
name or test
The command can take a number of different name generating syntax to point to a corresponding label.
name
The name of the label to which to jump
 
There is no limit to the number of characters used for the name of a jump or label.
test
A showstring, or a combination of showstrings, including the use of elements' attribute values and x counter tests.
Additional Information
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 when using 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:
If 'a' is not equal to 1 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 PTC ALD to crash if loops are set up incorrectly. Consider the following:
<?:label_1><?{label_1>
If PTC ALD tries to format these commands, it will crash immediately as there is no exit condition for the loop.
Related Links