Glich - v0.3.0 Manual
do ... loop Statement
Development v0.3.0 Manual Glich Script Statements do ... loop

Statement: do .. loop

A do statements ... loop statement runs the statements in between until a 'while condition' or 'until condition' sub-statement causes the loop to exit. Currently the maximum number of iterations is fixed 1000.

If a 'while condition' sub-statement is encountered and the condition is false, the execution of the script moves to the first statement after the 'loop' keyword. Encountering an 'until condition' sub-statement breaks out of the loop if the condition is true.

do Statement Format
do statements ... while bool_expr statements ... until bool_expr statements ... loop
do Statement
ExampleOutput
let day = @date.g:dmy("1apr2017"); do write @text."g:wdmy+"(day) nl; until day >= @date.g:dmy("1may2017"); day += 7; loop Saturday 1 April 2017
Saturday 8 April 2017
Saturday 15 April 2017
Saturday 22 April 2017
Saturday 29 April 2017
Saturday 6 May 2017
Development v0.3.0 Manual Glich Script Statements do ... loop

Managed by WebPageLayout Validated by HTML Validator (based on Tidy)

9th March 2023