Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #19216

Re: >FLOAT and the empty string

From "Ed" <invalid@nospam.com>
Newsgroups comp.lang.forth
Subject Re: >FLOAT and the empty string
Date 2013-01-28 22:39 +1100
Organization Aioe.org NNTP Server
Message-ID <ke5o45$dco$1@speranza.aioe.org> (permalink)
References (1 earlier) <2013Jan11.121110@mips.complang.tuwien.ac.at> <kcovim$kqo$1@speranza.aioe.org> <2013Jan23.172141@mips.complang.tuwien.ac.at> <kdsra8$u7q$1@speranza.aioe.org> <XN6dned5nPzs3p_MnZ2dnUVZ_omdnZ2d@supernews.com>

Show all headers | View raw


Elizabeth D. Rather wrote:
> On 1/25/13 3:35 PM, Ed wrote:
> > Anton Ertl wrote:
> >> "Ed" <invalid@nospam.com> writes:
> >>> Why does >FLOAT *need* to return zero and true for a string
> >>> of blanks?  Apart from '94 "strongly encouraging" it.
> >>
> >> IIRC Elizabeth once posted that this is useful for processing data
> >> files cotaining floats.
> >
> > Many years ago someone here (not Elizabeth) told me it was for
> > handling Fortran data files.  I've never encountered these myself
> > and such use has never cropped up in discussions on c.l.f. AFAIK.
> > It is fortunate ANS didn't make their recommendation a requirement
> > as history has apparently shown little need for such a feature.
> >
> > BTW if one *does* choose to implement the ANS string of blanks
> > recommendation, then what an empty string ought return may
> > depend on the conventions of Fortran.  Any Fortran users out there?
> >
> >>> It would be very easy for an app to handle this without forcing
> >>>> FLOAT do it.  Not that I can recall ever encountering such a scenario.
> >>
> >> Likewise, if you want to report failure for blank strings, the program
> >> can check for that, too, if >FLOAT does not.
> >
> > This presupposes I have more need for >FLOAT to return true
> > for a string of blanks than otherwise.  I implemented the ANS'
> > recommendation for the same reason as most - I assumed
> > there was a need for it and ANS could justify it.  It appears I was
> > wrong on both counts.
>
> The real-world situation is that you may be handed a file created by
> whatever unknown software (COBOL? FORTRAN? NELIAC? ...) that has
> formatted it in a way that seemed sensible to someone at the time. It
> may use blank separators, some other separators, or it may use no
> separators at all but just have fixed-length fields for each item.
> Suppose there's a 20-char field for a floating point number that is
> simply missing (i.e., there are 20 blanks). What do you want *your*
> program to do?

And what if a blank in this data file of unknown origin represented
a null input or error?  What would you want your program to do?

Conventionally a blank is *not* considered a floating-point number.
Should I ever need a string of blanks or asterisk (*) etc., to represent
0.0 then I'll make the program do it.  Why should >FLOAT lose the
ability to discriminate against things which are not accepted as
being floating-point numbers?  It defeats the purpose.


Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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