Quantcast

Serious bug in SP-Forth

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Serious bug in SP-Forth

Gerry Jackson
In SP-Forth 4.20, a simple example to show the problem.

: x >r begin r@ . r@ -255 0 within while r> 1+ >r repeat r> drop ;
-3 x
-3 -2 -1 -256  Ok

Should be
-3 -2 -1 0 Ok

The r> 1+ >r inside the loop increments -1 to -256

Gerry Jackson




------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Spf-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spf-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serious bug in SP-Forth

Andrey Cherezov
On my PC (Athlon X2) Version 4.20 Build 036 at 06.Mar.2009

: X >R BEGIN R@ . R@ -255 0 WITHIN WHILE R> 1+ >R REPEAT R> DROP ;
-3 X
-3 -2 -1 0
  Ok

22.09.2009 12:41, Gerry Jackson wrote:

> In SP-Forth 4.20, a simple example to show the problem.
>
> : x>r begin r@ . r@ -255 0 within while r>  1+>r repeat r>  drop ;
> -3 x
> -3 -2 -1 -256  Ok
>
> Should be
> -3 -2 -1 0 Ok
>
> The r>  1+>r inside the loop increments -1 to -256
>
> Gerry Jackson
>
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Spf-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/spf-dev
>    


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Spf-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spf-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serious bug in SP-Forth

Andrey Cherezov
Seems this bug was fixed in the revision 1.64, Mon Feb 23 21:31:32 2009 of macroopt.f
http://www.forth.org.ru/log/SpfSrcChangeLog.xml


23.09.2009 13:48, Andrey Cherezov wrote:
On my PC (Athlon X2) Version 4.20 Build 036 at 06.Mar.2009

: X >R BEGIN R@ . R@ -255 0 WITHIN WHILE R> 1+ >R REPEAT R> DROP ;
-3 X
-3 -2 -1 0
 Ok

22.09.2009 12:41, Gerry Jackson wrote:
In SP-Forth 4.20, a simple example to show the problem.

: x>r begin r@ . r@ -255 0 within while r>  1+>r repeat r>  drop ;
-3 x
-3 -2 -1 -256  Ok

Should be
-3 -2 -1 0 Ok

The r>  1+>r inside the loop increments -1 to -256

Gerry Jackson


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Spf-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spf-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serious bug in SP-Forth

ygrek-3
On Wed, 23 Sep 2009 14:03:13 +0300
Andrey Cherezov <[hidden email]> wrote:

> *Seems this bug was fixed in the revision 1.64, Mon Feb 23 21:31:32 2009
> of macroopt.f
> http://www.forth.org.ru/log/SpfSrcChangeLog.xml*
>
> 23.09.2009 13:48, Andrey Cherezov wrote:
> > On my PC (Athlon X2) Version 4.20 Build 036 at 06.Mar.2009
> >
> > : X >R BEGIN R@ . R@ -255 0 WITHIN WHILE R> 1+ >R REPEAT R> DROP ;
> > -3 X
> > -3 -2 -1 0
> >  Ok


Yes, the bug manifests itself in 4.20, verified on released debian package.
Looks like we should break "one release a year" rule :)

--
 ~ygrek

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Spf-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spf-dev
Loading...