Skip to main content

When-the-Current-Condition-Is-Not-Set-Up,--Cycle-Execution-Operation

Command Description

When using the Until, continue using the value block (block) when the value of the Conditional Expression (Expression) is false (not established), exiting the loop when the value of the Conditional Expression (EXPRESSION) is true (established)

Command Prototype

Do Until expression

Loop

Parameter Description

ParameterRequiredTypeDefaultDescription
expressionTrueexpression1 > 0The expression used for judgment

Demo

TracePrint("------------------------------------ Loop when condition is not true------- ------------------------------------") 
//-------------------------------------------------------------------------------
//[Remarks] When using Until , when the value of expression is true, the execution of the Block statement block is continued, and when the value of expression is false, the loop is exited.
TracePrint("Let a=1, when a is not equal to 10, execute a self-increment by 1 until a is equal to 10, exit the loop")
a = 1
Do Until a=10
a = a + 1
Loop
TracePrint(a)