Search Help:  
 
Enter keywords to search help.

RTML—Iteration

Iteration operators let you cause certain expressions to be evaluated repeatedly. For example, the FOR-EACH operator takes two arguments: a variable and a sequence. The expressions within it will be evaluated once with the variable set to each element of the sequence.

A string is one kind of sequence. For example, this template

Letters ()
TITLE "A B C..."
BODY
   FOR-EACH variable letter
      sequence "abcdefg"
   TEXT letter
   LINEBREAK

will generate a page containing the letters a through g on separate lines.

In English, it says: for each letter in "abcdefg", display that letter followed by a linebreak.

See Also


Was this article helpful?

Yes   No
Click to contact Customer Care for further assistance.