Re: Python has Traps; Does Euphoria have Programming Traps?
- Posted by petelomax Aug 13, 2013
- 2235 views
I want to say floating point loops, eg
for x=1.7 to 1.9 by 0.1 do ?x end for
vs
for x=9.7 to 9.9 by 0.1 do ?x end for
Not particularly difficult to fix individual cases application-side (impossible to fix interpreter/compiler-side), but it has always struck me as a bit of a deliberate and malicious pitfall waiting to catch someone out.
In fact I would be surprised if anyone here can accurately predict what that code is going to display without testing it first.
Pete