Re: likely value() error!
Looking at get.e, it seems that commas are legal delimiters for Euphoria =
objects represented in a string (to simplify the code, I imagine). The =
'value' function is interpreting everything up to the ',' which means =
all it sees is "1". Replacing the string with "123,456" yields a value =
of 123.
This is an interesting fluke, I'm surprised it hasn't been noticed yet =
(perhaps it's just not considered a fluke...) Does anyone know if this =
has been addressed in 2.1? (I'm only using the 2.1 interpreter, I =
haven't copied the 2.1 include files into my working directory yet.)
Rod Jackson=20
----------
From: Alan Tu[SMTP:ATU5713 at compuserve.com]
Sent: Friday, March 12, 1999 11:31 AM
To: EUPHORIA at LISTSERV.MUOHIO.EDU
Subject: likely value() error!
I have the following program:
include get.e
sequence s
object x
s =3D "1,234"
x =3D value(s)
? x[1] =3D GET_SUCCESS
? x
I get the following output:
1
{0,1}
Now, I wrote this program to see what would happen if I tried to convert =
a
number like 1,234 i.e, with a comma. Not only did it not convert =
property,
but the error code was GET_SUCCESS. Hmmm.
Alan
=20
|
Not Categorized, Please Help
|
|