do

Synopsis:
do <commands>
do { <commands> } [while (<condition>) ]

Description:
In its base form, do behaves much like eval. It evaluates its input once, then executes it. It is superior in some respects, however. For instance, it can cope with complex commands (multiple commands within curly braces). Furthermore, do has the ability to mimic the while command. While the operation is not identical, it is similar. It only differs in that the condition is evaluated after each loop iteration, so the loop is guaranteed to run for at least one iteration.

See Also:
To force expansion of some variable $foo:
/do echo the variable $$foo expands to $foo

To run the same command in indefinite number of times, but at least once:
assign blah 2
do {
..echo $blah is lower than 3
} while ( blah = rand(5) < 3 )

See Also:
eval
while

Other Notes:
This command is mostly supported for compatibility with irc clients. Internally, it uses more resources than eval, so it isn't of much practical use, save for its looping ability.

 

Back

Hosted by www.Geocities.ws

1