[BUG] ++ is TOO destructive ...

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

[BUG] ++ is TOO destructive ...

Post by newdep »

I think this is a bug Lutz...
newLISP v.10.3.0 on Linux IPv4/6, execute 'newlisp -h' for more info.

> (symbol? a)
nil
> (symbol? b)
nil
> (symbol? 1)
nil
> (symbol? '1)
nil
> (++)
1
> (symbol? a)
1
> (symbol? b)
1
> (symbol? 1)
1
> (symbol? '1)
1
>
ps: goes for (--) as well...
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: [BUG] ++ is TOO destructive ...

Post by Lutz »

This is fixed here: http://www.newlisp.org/downloads/develo ... nprogress/

There will be a maintenance release later. This bug stayed undetected since 10.2.

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Re: [BUG] ++ is TOO destructive ...

Post by cormullion »

Code: Select all

> (dotimes (x 10) (++))
10
> (++)
11
> 
must be useful somehow? :)

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Re: [BUG] ++ is TOO destructive ...

Post by newdep »

Hi Lutz,

It took some time to discover that my functions where all returning 'true ;-)
..to this (++) issue.. quite funny actualy but not consistant, thats how i discovered it. Thanks for the quick fix!

The main difference now between (++) and (inc) is integer and float handling, could then (++) and (--) be
handled like (inc) and (dec) too? Just to takeaway confusion on the function format ?

Example from 10.3.1 ->

> (++)
ERR: invalid parameter in function ++

> (inc)
1
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: [BUG] ++ is TOO destructive ...

Post by Lutz »


Locked