[While] ... [/While] repeats the contents of the container tag until the condition specified in the opening tag returns False.
[While: Conditional Expression]
...
[/While]
Use the [While] ... [/While] tags with an appropriate conditional expression. The following example calculates the Fibonacci numbers until one greater than 1000 is returned.
[Var: 'Fibonacci_One'=1]
[Var: 'Fibonacci_Two'=1]
[While: (Var: 'Fibonacci_One')<1000]
[Var: 'Fibonacci_New'=(Var:'Fibonacci_One') + (Var:'Fibonacci_Two')]
[Var: 'Fibonacci_Two'=(Var:'Fibonacci_One')]
[Var: 'Fibonacci_One'=(Var: 'Fibonacci_New)]
[/While]
<br>[Var:'Fibonacci_One']
<br>1237
Tag Link | [While] ... [/While] | Category | Conditional |
---|---|---|---|
Type | Container | Data Source | Any |
Support | Preferred | Version | 2.5 |
Output Type | None | Security | None |
Implementation | Sets | Lasso 5.0,LDML3x,LDML25 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft