CONTINUE

Skip the remaining part of a WHILE loop within a batch file.

Syntax

CONTINUE

Parameters

None.

Description

This command is used within batchfiles. It skips the remaining part of a WHILE loop and resumes at the test expression.

Example

! Example batch file con.xdb
set val @count = 0
while 1 then
    set val @count=@count+1
    if @count%5 then
       continue
    end
    eval @count
    if @count > 50 then
       break
    end
end

The remaining part of the WHILE loop (after continue) is skipped for all values of @count not divisible by 5. The result is as follows when executing the example batch file using BATCH "con.xdb":

@COUNT : 5                             [@COUNT]
@COUNT : 10                            [@COUNT]
@COUNT : 15                            [@COUNT]
@COUNT : 20                            [@COUNT]
@COUNT : 25                            [@COUNT]
@COUNT : 30                            [@COUNT]
@COUNT : 35                            [@COUNT]
@COUNT : 40                            [@COUNT]
@COUNT : 45                            [@COUNT]
@COUNT : 50                            [@COUNT]
@COUNT : 55                            [@COUNT]

See Also

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