Show TOC

repeat StatementLocate this document in the navigation structure

Use

Purpose

Repeats a substitution a given number of times.

Syntax

repeat <expression> times <statement> end

Description

If a certain area in the HTML page is to be repeated several times, and the loop index is not involved, this can be done simply by using this statement.

Example
        
`repeat 10 * c times` <td> `end`
         

Both the repeat and for statements allow you to perform repeated substitution in HTMLBusiness expressions. They force the Internet Transaction Server (ITS) to perform a substitution multiple times. These statements allow you to include step loops in HTML pages and structure them as you like.

The following table shows some example uses:

repeat

for

`repeat 10 times` <p></p> `end`

`for(i=1;i<=10;i++)` <p></p> `end`

`repeat with i in FIELD_OP` <option value="`i`"> `end`

(No equivalent for statement.)

`repeat with i from 1 to FIELD_OP.dim` <option value="`FIELD_OP[i]`"> `FIELD_BZ[i]` `end`

`for(i=1; i<=FIELD_OP.dim; i++)` <option value="`FIELD_OP[i]`"> `FIELD_BZ[i]` `end`

More Information

For further information on the repeat statement, see:

For information on the for statement, see: