Skip to main content

CSP Tags: <csp:loop>

The <csp:loop> tag repeats a code block a specified number of times.

Add the code shown below to MySamplePage.CSP between <body> and </body>. The code executes OddEvenTest ten times placing the result in a bulleted list. You can remove any other code from between <body> and </body>.

<csp:loop counter="i" from="1" to="10" step="1">

<script language="cache" method="OddEvenTest" arguments="val1:%Integer" 
  If (val1#2=0) { quit "even" }
  Else {quit "odd"}

Click View —> Web Page to view MySamplePage.CSP in a Web browser.

generated description: looptag20142

FeedbackOpens in a new tab