murex Shell Docs

Command Reference: while

Loop until condition false

Description

while loops until loops until condition is false.

Normally the conditional and executed code block are 2 separate parameters however you can call while with just 1 parameter where the code block acts as both the conditional and the code to be ran.

Usage

Until true

while { condition } { code-block } -> <stdout>

while { code-block } -> <stdout>

Until false

!while { condition } { code-block } -> <stdout>

`` !while { code-block } -> <std

Examples

while $i is less then 5

» let i=0; while { =i<5 } { let i=i+1; out $i }
1
2
3
4
5

» let i=0; while { let i=i+1; = i<5; out }
true
true
true
true
false

while $i is NOT greater than or equal to 5

» let i=0; !while { =i>=5 } { let i=i+1; out $i }
1
2
3
4
5

» let i=0; while { let i=i+1; = i>=5; out }
true
true
true
true
false

Synonyms

See Also

This site's content is rebuilt automatically from murex's source code after each merge to the master branch. Downloadable murex binaries are also built with the website.

Last built on Tue Sep 20 07:48:14 UTC 2022 against commit 1769d5b1769d5bb0ba4eaf204a5e0f52053b8f877bb7466.

Current version is 2.11.2030 which has been verified against 16798 tests cases.