slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] eval function


On Fri, 29 Apr 2005 15:15:08 +0200, Laurent Perez <Laurent.Perez@xxxxxxxxxxxxxxxxx> said:

> Hi,

> I noticed that in slang :
> eval("0.123") return a float : 0.123
> eval(".123") return an integer : 123

However,
eval(" .123") returns 0.123.

The dot at the beginning of the string is taken to mean "evaluate this in
RPN".  123 in RPN is still 123.

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]