Menu

#324 Iteration with floats

open
nobody
None
5
2012-03-11
2012-03-10
No

Is there a reason why the following snippet doesn't work as expected in both 4.6 and 4.7?
I only get one iteration with output "0". Tested using gnuplot compiled by MinGW on Windows.

do for [t = 0.01:0.10:0.01] {
print t
}

Discussion

  • Péter Juhász

    Péter Juhász - 2012-03-11

    The docs say "The iteration variable ('i' in this example) is treated as an integer".

    Look at check_for_iteration() in parse.c: it uses int_expression to parse the for exrpression.

     
  • Bastian Märkisch

    Right. So I make this a feature request then. Thanks.

     
  • Bastian Märkisch

    • labels: 102070 -->
    • summary: Iterationwith floats --> Iteration with floats
     

Log in to post a comment.