bug-gforth
[Top][All Lists]
Advanced

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

[Bug-gforth] [bug #49798] s>number? throws in a random 0


From: anonymous
Subject: [Bug-gforth] [bug #49798] s>number? throws in a random 0
Date: Wed, 7 Dec 2016 22:36:54 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

URL:
  <http://savannah.gnu.org/bugs/?49798>

                 Summary: s>number? throws in a random 0
                 Project: Gforth
            Submitted by: None
            Submitted on: Wed 07 Dec 2016 10:36:52 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

according to this
http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Line-input-and-conversion.html#index-s_003enumber_003f-_0040var_007b-addr-u-_002d_002d-d-f---_007d--gforth-2160
s>number? should just leave a flag indicating success on the top of stack,
followed by the number the string was converted to. However, when I run it,
there is a 0 between those two values on the stack. It is always a zero,
regardless of what string I give it so far. To test, just do something like 

clearstacks s" 1001" s>number? .s

Which will give

<3> 1001 0 -1

Either the code or the documentation must be wrong.

I'm on gforth 0.7.9_20160923 amd64.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49798>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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