# while

Iteration command

Syntax

    while (<condition>) <command>

Description
Executes <command> while the <condition> evaluates to true (non zero result). <command> may be either a single command or a block of commands. It can contain the break command: in that case the execution of the <command> will be immediately interrupted and the control transferred to the command following this while block.
Examples

    %i = 0;
    while(%i < 100)%i++
    while(%i > 0)
    {
        %i -= 10
        if(%i < 20)break;
    }
    echo %i

Main index, Command index

KVirc 3.0.0 documentation
Generated by root at Thu Apr 29 12:41:05 2004