Web+ Tutorial

Previous

  Contents  

Next

Lesson 4.3 - Looping (webFor...webExitFor)

Description
Repeats a group of instructions a specified number of times.
Syntax
<webFor #counter# = #start# To #end# [Step #increment#]>
    [instructions]
    [<webExitFor>]
    [instructions]
</webFor [#counter#]>

Agument
/tutorial/argument/arg16.wml
Example
<webFor #num# = 2 to 20 Step 2>
    <webPrint>#num#</webPrint>
</webFor num>

<webFor #counter# = 10 to 5 Step -1>

    <webPrint>#counter#</webPrint>
</webFor>

Exercise

You can try out some Web+ code of your own here.

Previous

  Contents  

Next

 

Copyright © 2009 Webplus, Inc. (talentsoft). All Rights Reserved.
webmaster@webplus.com