|
From: Arun P. <ape...@lb...> - 2012-04-30 22:21:53
|
Hi
I just ran across the following problem:
do for [i=5:1] {
print i
}
prints "5" instead of doing nothing. Is this the intended behavior?
This seems due to the use of a "do {} while" structure in
src/command.c:do_command, instead of perhaps a while or for.
Other places in gnuplot where "for" is used, don't seem to do this:
plot for [i=5:1] sin(i*x)
=> nothing is plotted.
system: linux (openSUSE Tumbleweed)
gnuplot version: from 2012-04-30 (ff262a693106d from
https://github.com/gnuplot/gnuplot.git)
just FYI:
I came across this using the following
do for [i=1:N] {
do for [j=(i+1):N] { # (i+1 will be N+1 during the last i-iteration)
print "doing ".i." ".j
}
}
ARUN
|