Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #18676
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Subject | Re: >FLOAT and the empty string |
| Newsgroups | comp.lang.forth |
| Message-ID | <89711692028434@frunobulax.edu> (permalink) |
| Date | 2013-01-11 19:32 +0200 |
| References | <kcnl77$r2q$1@dont-email.me> |
| Organization | Wanadoo |
"David N. Williams" <williams@umich.edu> writes Re: >FLOAT and the empty string
> The post raises this question:
>
>Does the standard specification for >FLOAT require that
>
> s" " >FLOAT
>
>shall return false, instead of true and 0E0?
[..]
> A string of blanks should be treated as a special case
> representing zero.
This seems clear enough.
[..]
>But I don't see how a string of blanks can be empty! Maybe it
>would be a good idea to specify that the empty string should be
>treated as a special case of a string of blanks. But if so,
>shouldn't that be made explicit?
> What do people think?
The question seems to be if S" " is formally inside the set
of "string of blanks." As all Forths certainly think that S" "
is a string of one blank, and consider S" " a string, why
shouldn't S" " not be string of zero blanks (or any other
character). I don't know if it is possible to prove it, but
for me the rule of least surprises says it is certainly not
OK say that is NOT a string of blanks. If you take away 1 Euro
from a 1 Euro pile of money, the result is 0 Euros, not
0 anything.
-- ---------
iForth version 4.0.929, generated 23:21:08, January 7, 2013.
x86_64 binary, native floating-point, extended precision.
Copyright 1996 - 2013 Marcel Hendrix.
FORTH> s" " >FLOAT .s
Data: -1 ---
System: ---
Float: 0.0000000000000000000 --- ok
[1]{1}FORTH>
-- ----------
-marcel
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
>FLOAT and the empty string "David N. Williams" <williams@umich.edu> - 2013-01-10 19:09 -0500
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-11 13:32 +1100
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-11 11:11 +0000
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-11 23:10 +1100
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-23 16:21 +0000
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-25 13:35 +1100
Re: >FLOAT and the empty string "Elizabeth D. Rather" <erather@forth.com> - 2013-01-25 21:33 +1300
Re: >FLOAT and the empty string "Elizabeth D. Rather" <erather@forth.com> - 2013-01-25 21:41 +1300
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-28 22:39 +1100
Re: >FLOAT and the empty string "Elizabeth D. Rather" <erather@forth.com> - 2013-01-28 10:36 -1000
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-29 11:11 +1100
Re: >FLOAT and the empty string Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-29 03:19 -0600
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-30 11:03 +1100
Re: >FLOAT and the empty string Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-11 05:39 -0600
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-23 16:31 +0000
Re: >FLOAT and the empty string Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-23 10:44 -0600
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-23 17:21 +0000
Re: >FLOAT and the empty string Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-23 11:50 -0600
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-24 13:09 +0000
Re: >FLOAT and the empty string Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-24 09:22 -0600
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-24 16:16 +0000
Re: >FLOAT and the empty string albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-01-24 03:45 +0000
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-24 12:56 +0000
Re: >FLOAT and the empty string Alex McDonald <blog@rivadpm.com> - 2013-01-23 16:45 -0800
Re: >FLOAT and the empty string Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-24 03:43 -0600
Re: >FLOAT and the empty string Bernd Paysan <bernd.paysan@gmx.de> - 2013-01-24 16:59 +0100
Re: >FLOAT and the empty string mhx@iae.nl (Marcel Hendrix) - 2013-01-11 19:32 +0200
Re: >FLOAT and the empty string "David N. Williams" <williams@umich.edu> - 2013-01-20 10:30 -0500
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-21 16:51 +0000
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-23 11:42 +1100
Re: >FLOAT and the empty string Mark Wills <forthfreak@gmail.com> - 2013-01-23 02:38 -0800
Re: >FLOAT and the empty string anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-01-23 15:14 +0000
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-25 14:11 +1100
Re: >FLOAT and the empty string Mark Wills <forthfreak@gmail.com> - 2013-01-24 23:33 -0800
Re: >FLOAT and the empty string Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-01-25 02:52 -0600
Re: >FLOAT and the empty string "Ed" <invalid@nospam.com> - 2013-01-28 22:53 +1100
csiph-web