bug?

Started by kesha, October 06, 2016, 11:15:10 AM

Previous topic - Next topic

kesha


newLISP v.10.7.1 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h

> (= 'A 'A)
true
> (= 'A 'B)
nil                                               <--------------- !!!
> (define (Test A B C))
(lambda (A B C))
> (++ (find 'D (first Test)))
1
> (= 'A 'A)
true
> (= 'A 'B)
1                                                <---------------- ???

Lutz

#1
Thanks for finding this. nil is only allowed in ++, --, inc and dec when contents of a variable, else it is seen as a wrong parameter.



fixed here: http://www.newlisp.org/downloads/development/inprogress/">http://www.newlisp.org/downloads/develo ... nprogress/">http://www.newlisp.org/downloads/development/inprogress/

rrq

#2
I'd say Bug!



Apparently ++ manages to increment nil so now the value of nil is 1.

It also appears to require a compound set of circumstances for allowing ++ increment nil, so: Well done, for finding this problem.



EDIT: Lutz was already well ahead (of course?).

kesha

#3
Thanks Lutz!