REPEATING TEXT

Unibase can preprocess repeated text in much the same way it can substitute environment variables. This is done at a low level and so the repeated text is available to report formats, scripts, dictionary entries, etc.

The syntax is simple:

{#<times>{:<start>{:<increment>}};,<text>}

where <times> is the limit of the repeat index.
<text> is the text to repeat (which may span several lines).
<start> is the starting index (optional – default 1)
<increment> is the uncrement per iteration (optional – default 1)
All three numbers can be negative. It works very much like a ‘for loop’ except the limit is the first number. This allows a simple repeat syntax where statr and index are 1.

eg.

{#23, size #}
{#-5:-1:-1,count backwards # }

Inside <text> the character ‘#’ is replaced by the current repeat number.

eg.

{#5,some text #
}

would become

some text 1
some text 2
some text 3
some text 4
some text 5