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/
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ bug-gforth mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-gforth
