Repeat
Top  Previous  Next

Definition

R block number | { commands }[[,]occurs]

R
Repeat command
block number
A number ranging from 0 to 9. The block number must be defined in the code with either a N or B type blocks specification.
Mutually exclusive with inline block of commands.
commands
Any commands in combination.
Mutually exclusive with blackener.
occurs
Default 1.
The number of times the referenced block number or the commands enclosed in braces will be repeated.


Usage

The block and procedure are identical with one minor difference. The block (B) has a default occurrence of 1 while the procedure (N) has a default occurrence of 0. This allows the procedure to define a shape without that shape being represented in the shape until referenced by a repeat (R) command.

The Block command along with its occurs option is used to enclose a series of commands and have those commands used in the shape. Repeating a Block or Procedure is the function of the Repeat command.

The following are all equivalent:

b1{d1,90}

n1{d1,90}
r1


n1{d1,90}1

b1{d1,90}0
r1


r{
d1,90}

In the last example above, the repeat uses the inline block specification.

The difference to using a numbered block vs an inline block, is that the numbered block can be repeated later in the same shape definition with a reference to it by the Repeat command.

The block number is referenced by the Repeat command to repeat the commands enclosed by the { }. The Repeat may optionally specify a number of occurrences the commands are to be repeated.

Repeat block one, four times would be written:

r1,4