slang-users mailing list

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

[slang-users] integer() returns unexpected values


I did not expect integer() to do the following:

=====================================================================
slsh version 0.8.6-0; S-Lang version: 2.2.4
Copyright (C) 2005-2011 John E. Davis <jed@xxxxxxxxxxx>
This is free software with ABSOLUTELY NO WARRANTY.

slsh> integer("23");
23
slsh> integer("023");
19
=====================================================================

I expected to get the integer 23 both times.

http://www.jedsoft.org/slang/doc/html/slangfun-13.html#integer doesn't 
cover the behavior I see.  What explains this behavior?

Thanks.



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