# htp on-line reference : WHILE

## syntax

`<unset email_addr>
`

## synopsis

WHILE is the building block for repeated processing. The basic form is shown above.

"Conditional" is either a "compare" or "is defined" operation. A compare operator is a test of the value of a macro against a literal string. If the NOT tag is present in the WHILE markup, the evaluation of the conditional is reversed:

`<file include="header.hti">
<set sect-ctr="1">
<while sect-${sect-ctr}>
<use sect-${sect-ctr}>
<inc sect-ctr>
</while>
<file include="footer.hti">
`

Just as with IF you can also check for a macro's existance:

`<a href="mailto:$email">mailto hyperlink</a>
<a href="http://$domain/~${username}/">another hyperlink</a>
`

If the condition is true, the block is evaluated and afterwards the WHILE tag is evaluated again. If the '$'-operator is used in the WHILE tag it is also reevaluated on each iteration.

A loop block must be closed with the /WHILE tag.

hosted by Sourceforge HTML coding

Copyright © 1995–96 Jim Nelson. Copyright © 2001–2014 Jochen Hoenicke. Permission to reproduce and distribute this hypertext document granted according to terms described in the License section. last updated Sat May 16, 2015