Subversion Repositories wimsdev

Rev

Rev 6097 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <p>
  2. Syntax: <span class="tt wims_code_words">\\for{var=\\m to \\n}{content}</span>, or
  3. <span class="tt wims_code_words">\\for{var in \\list}{content}</span></p><p>
  4. where <span class="tt wims_code_words">var</span> can be any variable name, <span class="tt wims_code_words">\\m, \\n</span>
  5. can be any integer, and <span class="tt wims_code_words">\\list</span> is a comma-separated list of items.
  6. The <span class="tt wims_code_words">content</span> can make use of <span class="tt wims_code_words">var</span>.
  7. </p>
  8. For example,
  9. <pre>\\for{tt=1 to 10}{
  10. \\def{integer square=\\tt^2}
  11. &#92;(\\tt^2) = \\square<br/>}</pre>
  12. gives
  13.  
  14. \for{tt=1 to 10}{\def{integer square=\tt^2}\(\tt^2) = \square<br/>}
  15.