Syntax:
do for <iteration-spec> {
<commands>
<commands>
}
Execute a sequence of commands multiple times. The commands must be enclosed
in curly brackets, and the opening "{" must be on the same line as the do
keyword. This command cannot be used with old-style (un-bracketed) if/else
statements. See if (p.
). For examples of iteration specifiers, see iteration (p.
).
Example:
set multiplot layout 2,2
do for [name in "A B C D"] {
filename = name . ".dat"
set title sprintf("Condition %s",name)
plot filename title name
}
unset multiplot
See also while (p.
), continue (p.
), break (p.
).