RE: Little incosistency in Euphoria 2.2
- Posted by Kat <gertie at PELL.NET> Apr 26, 2001
- 398 views
On 27 Apr 2001, at 9:59, Derek Parnell wrote: > Hi, > this is not really an inconsistency problem, but still an annoyance. > > The reason is that value() is interpreting "-45.6e-" as a number in written in > scientific notation. However it is a malformed number as it is expecting an > integer to follow the "e" character. For example "-45.6e3" is the notation for > -45.6 times 10 to the power 3, namely -45600. Also "-45.6e-3" is the notation > for -45.6 times 10 to the power -3, namely -0.0456. Wouldn't this be a great reason to not use value()? So far, i haven't found a reason to use it anywhere. What would be a use for it that it cannot be replaced by another function, such as sprintf("%d",variable)? Kat > ----------- > cheers, > Derek Parnell > > > -----Original Message----- > > From: rforno at tutopia.com [mailto:rforno at tutopia.com] > > Sent: Friday, 27 April 2001 6:20 AM > > To: EUforum > > Subject: Little incosistency in Euphoria 2.2 > > > > > > > > While investigating the value() function and trying to mimic it, I > > discovered this little inconsistency: > > value("-45.6a-") gives {0,-45.6} > > but > > value("-45.6e-") gives {1,0} > > > > > >