Interpreter erroneously reading some numbers

new topic     » topic index » view thread      » older message » newer message

Forked from Re: POLL: What should value do with underscores?

BRyan said...
SDPringle said...

It seems to me, there is no controversy and leaving value and get to not handle underscores specially. The front end presently parses: 1.7976931348623159e308 as 1.348269851e+308. My intention is to make the scanner throw an error when the biggest value is exceeded.

Shawn

Can't this be prevented by a user defined type ?

As far as parsing; allowing various forms of values is just adding more omplications.

and defeating the simplicity of euphoria.

Bad coding errors should just fail !

The better solution is improve the error reporting explaining what caused the error.

I have forked because my last post was off topic and I realized that I may have caused some confusion. See ticket 877. Some numbers are read wrong and although the same problems with 4.0.5 may not be there, there are new problems that were previously not there. In the HEAD of 4.0, some numbers cause the computer to hang a long time, some numbers are just interpreted wrong, so the interpreter doesn't see the original number it sees instead an erroneous value. Now, arguably it should parse correctly if the string is inside the range of a double. This number I have given as an example isn't. So, what should we do with this? Should we make these numbers read as inf or should we error out and notify the user?

Shawn

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu