Some strange behavior:
(set 'lst '("23" "hello" "3.14"))
(float (lst 1))
; -> "3.14" instead of nil
Why so?
newLISP v.10.3.2 64-bit on OSX IPv4/6 UTF-8, execute 'newlisp -h' for more info.
> (set 'lst '("23" "hello" "3.14"))
("23" "hello" "3.14")
> (float (lst 1))
nil
>
and
newLISP v.10.4.4 on OSX IPv4/6 UTF-8 libffi, execute 'newlisp -h' for more info.
> (set 'lst '("23" "hello" "3.14"))
("23" "hello" "3.14")
> (float (lst 1))
"3.14"
>
indicate some kind of regression over the last year. I haven't got the intermediate versions here to test when this happened...
I get the same thing on 10.4.1. But note that (lst 1) returns "hello", as expected.
newLISP v.10.4.1 on Win32 IPv4/6 libffi, execute 'newlisp -h' for more info.
> (set 'lst '("23" "hello" "3.14"))
("23" "hello" "3.14")
> (float (lst 1))
"3.14"
> (lst 1)
"hello"
Good catch, denis.
Same issue on my Linux desktop.
newLISP v.10.4.3 on Linux IPv4/6 UTF-8 libffi, execute 'newlisp -h' for more info.
> (set 'lst '("23" "hello" "3.14"))
("23" "hello" "3.14")
> (float (lst 1))
"3.14"
This is a bug in the 'float' function when using it on list elements, introduced in a development release before 10.4.0 and is fixed now in 10.4.5 in progress:
http://www.newlisp.org/downloads/development/inprogress/
I will do a maintenance release as soon as I am back in the US next week, probably on the 15th of November.