newLISP Fan Club

Forum => Whither newLISP? => Topic started by: 0x69 on May 13, 2019, 05:04:20 AM

Title: problem with floats
Post by: 0x69 on May 13, 2019, 05:04:20 AM
Hi,



When I try to execute (+ 1.1 1.2) I get error:
QuoteERR: value expected in function + : .1


NewLisp version is v.10.7.1 64-bit on Linux (Ubuntu 18.04.1 LTS) IPv4/6 UTF-8 libffi



What's the problem here with floats and how to fix it ?
Title: Re: problem with floats
Post by: HPW on May 13, 2019, 05:42:33 AM
Hello,



Take a look at your locale with (set-locale).



This sets the locale to german with , as decimal seperator:

(set-locale "de_DE")



And note that + is for integer-math. Use (add ... ...) for floats.



And the doc has good explanations for that. ;-)



Regards