WHILE

Execute a command list as long as the result of a specific expression is true.

Syntax

WHILE expression THEN commandlist END

Parameters

expression

Can contain relations or logical expressions as used within the C/C++ programming language. See also Combining Elements. Debugger variables are also permitted as operands. For example:

WHILE value != 0x1F THEN …

 

WHILE @test == 0 THEN …

commandlist

Any sequence of debugger commands, separated by semicolons “;”

Description

This command is used within batchfiles. It executes the command list commandlist as long as the result of expression is true.

Example

! Example batch file when.xdb
set val @input = 0
while 1 then
set val @input = @input + 1
eval @input
! Condition: if @input is equal to 5 then break
if @input == 5 then break end
end

See Also

For more complete information about compiler optimizations, see our Optimization Notice.