Re: Bug in number conversion (?)

From: Elizabeth D Rather <erather_at_forth.com>
Date: Thu, 29 Jun 2000 13:59:01 -0700

At 02:28 PM 6/29/2000 -0600, you wrote:
>I recently typo'd in "3+" in a definition and found that I got the double
>number
>3.0 -- that is surely not the intended behavior of the number conversion
>routines, is it?
>
>Jeff

Yes, actually it is. See the discussion in Section 4.3 of the SwiftForth
Reference Manual. All legal punctuation (, . + / : and - anywhere but at
the left end of a number) triggers double precision. This has been around
in many Forths since the invention of Forth in the early 70's. It
facilitates input processing of many kinds of formatted numbers, e.g.
229-48-332, 8/03/40, 12:30:45, etc.

Cheers,
Elizabeth

===============================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-372-8493
111 N. Sepulveda Blvd. Fax: +1 310-318-7130
Manhattan Beach, CA 90266
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
===============================================
Received on Thu Jun 29 2000 - 14:07:34 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 09-Feb-2012. Archive updated nightly.