NOTE: This invite-only release of SunSed Alpha is for testing purposes and in no way represents the final quality of the product — join the waitlist (~wait time: 2 weeks). SunSed release date is on March 11, 2022.


Loops through the block of code at least once and then will continue to loop as long as the WHILE condition is TURE.

DO {
    // code to execute for each iteration
} WHILE (condition)

Very similar to WHILE with the exception of checking the condition at the end of each iteration, and not at the beginning. This means that your block of code will always run at least once regardless of the WHILE condition specified, and then at the end, after evaluating the WHILE condition, the DO WHILE decides to continue the loop or not.


$x = 1
DO {
    PRINT "X is" . $x
} WHILE ($x < 10)
Copyright © SunSed LLC 2013-2021 All rights reserved.