Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #19217
| From | "Ed" <invalid@nospam.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: >FLOAT and the empty string |
| Date | 2013-01-28 22:53 +1100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ke5otg$fei$1@speranza.aioe.org> (permalink) |
| References | <kcnl77$r2q$1@dont-email.me> <89711692028434@frunobulax.edu><kdh2jf$4sm$1@dont-email.me><kdnbmq$p3t$1@speranza.aioe.org> <5fb78203-f061-400b-b4d6-350d35e67174@s9g2000yqe.googlegroups.com><kdst6i$1se$1@speranza.aioe.org> <75f095ab-322f-46b5-9a35-8263b81aa8bd@k6g2000yqf.googlegroups.com> |
Mark Wills wrote:
> ...
> An interesting conundrum. Let's go back to the definition:
> ...
>
> *A string of blanks should be treated as a special case
> representing zero.*
>
> I don't have the standard to hand, I did a quick search of the ANS doc
> for the definition of should but didn't find it. I presume should is a
> recommendation, rather than a requirement (e.g. shall).
The Rationale section spells it out:
A.12.6.1.0558 >FLOAT
...
While >FLOAT *is not required to treat a string of blanks as zero*,
this behavior is strongly encouraged, since a future version of ANS
Forth may include such a requirement.
> ...
> So I would say it's clear: Follow the recommendation.
It is clear the recommendation was optional :)
> It would have been far more useful IMHO if it were mandatory rather
> than optional.
>
> On the subject of treating blanks as zero itself, I would have
> preferred it to return false. If my code is chewing on white-space
> then I'd like to know - maybe it's gone wrong.
Not just that. Returning True for a string of blanks requires effort
on the part of the implementor. We know the negatives involved
- inability of >FLOAT to discriminate blanks, extra code to implement.
I know how to make a program accept a string of blanks without
dumbing down >FLOAT.
> Also, the dynamic stack signature sucks IMHO! They are the work of
> Satan! But I digress...
That's an interesting point. Can you think of problem with >FLOAT
returning just FALSE when it fails?
Back to comp.lang.forth | Previous | Next — Previous 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