bug-gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gforth] [bug #37818] DUMP changes output base surprisingly


From: Bernd Paysan
Subject: Re: [Bug-gforth] [bug #37818] DUMP changes output base surprisingly
Date: Tue, 27 Nov 2012 14:58:12 +0100
User-agent: KMail/4.8.5 (Linux/3.4.11-2.16-desktop; KDE/4.8.5; x86_64; ; )

Am Dienstag, 27. November 2012, 02:18:04 schrieb anonymous:
> URL:
>   <http://savannah.gnu.org/bugs/?37818>
> 
>                  Summary: DUMP changes output base surprisingly
>                  Project: Gforth
>             Submitted by: None
>             Submitted on: Tue 27 Nov 2012 02:18:03 AM UTC
>                 Category: None
>                 Severity: 3 - Normal
>               Item Group: None
>                   Status: None
>                  Privacy: Public
>              Assigned to: None
>              Open/Closed: Open
>          Discussion Lock: Any
> 
>     _______________________________________________________
> 
> Details:
> 
> To reproduce:
> 
> 1. Enter "0 dump" into gforth, so it prints a stack underflow message, ok.
> 
> 2. Enter "2 2 + ." and it prints "4" so everything seems to work fine.
> 
> 3. Enter "8 8 + ." and it prints "10" because the output base is now
> hexadecimal, which I wouldn't have expected.  It actually took me a while to
> figure out why I was getting wrong-looking numbers in my output because I
> thought it was my own buggy code making incorrect results.
> 
> Not sure what fix to suggest, e.g. maybe there should be an exception
> handler that restores the old output base.

We have that, it's called BASE-EXECUTE.

: dump ['] dump $10 base-execute ;

should wrap up dump nicely.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]