I recently came across this apparent inconsistency when going through someone's IDL code:
IDL> for i=0.,1.9,1. do print,i
0.00000
1.00000
IDL> for i=0.,1.9,1 do print,i
0.00000
1.00000
IDL> for i=0.,1.9 do print,i
0.00000
1.00000
2.00000
Could anyone explain if there is a logic behind the behaviour in the third loop.
The IDL version used is 8.2.0.
(Note that my own code would stick to using integers in a for loop, and definitely after finding this.)