Menu

#6 Do loop iteration variable set too early

2.0
closed
0.5 (2)
2018-01-10
2017-12-25
No

The DO loop iteration variable gets set too early. If the iteration variable is used in the limit expression or the step, the DO loop will execute the wrong number of times.
declare x fixed;
x = 20;
do x = 0 to x;
/ This should loop 21 times /
end;

Discussion

  • Daniel Weaver

    Daniel Weaver - 2018-01-10
    • labels: --> 0.5
    • status: open --> closed
     
  • Daniel Weaver

    Daniel Weaver - 2018-01-10

    Fixed in 0.5

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.