Question about checks for min and max values

Jay R. Ashworth jra at baylink.com
Wed Jul 27 10:16:34 PDT 2005


On Tue, Jul 26, 2005 at 07:35:41PM -0400, Kenneth Brody wrote:
> Quoting Jay R. Ashworth (Tue, 26 Jul 2005 18:15:34 -0400):
> [...]
> > Alas, they defined "equals" to mean something other than what every
> > other programming language (as well as common mathematics) defines it
> > to mean, which is the sole point that Mark and I are debating.
> 
> Since you have already pointed out that these other languages have no
> concept of "a number without a value", as is the case of an empty
> numeric field in filePro (which is what we're talking about here),
> how can you say that filePro's meaning is "something other than what
> every other programming language ... defines it to mean"?

3 separate threads have all gotten conflated, here.  Let us try to
untangle them.

> Please give me a specific example of how filePro's meaning of "="
> (or whatever token you wish to use) is different from the other
> programming languages you listed.
> 
> [...]
> > Nope.  But I'm not going to repeat myself.  How filepro's 'eq'
> > differs from the algebraic and string equals operator in other
> > languages is something I've explained about 5 times on this thread so
> > far.
> 
> You haven't explained how filePro's "algebraic equals" is different
> from other languages.

We got off onto how eq behaves numerically, I believe, when you
mentioned 0.0 != 0.00.  The original topic that drew me (and, I think,
Mark) into the thread, was the behavior of eq with strings, and
specifically that strings are 'eq' if they match to the length of the
shorter variable.

*This* was the behavior which I asserted was counter to that of
equivalent operators (or functions, when that's necessary for
comparison) in other languages, some of which already existed when
filePro's design was being taken.

As far as numerical equality is concerned, if filePro *does* believe
that 0.0 != 0.00, then I disapprove of that as much as I disapprove of
floating point implementations where 6 - ( 2*3 ) != 0.  (Ok, that's a
weak example, but I believe you know which artifact I'm referring to.)

As for "a number with a value", I much prefer the phrasing "a numeric
variable to which no value has been assigned".  How such a variable
should be expected to behave is, in fact, implementation-dependent, and
is the sole item I do *not* take issue with filePro on, here, oddly
enough: you can do anything you like with them.

If you choose to leave them blank as the representation of 'undef',
instead of returning a '0', that's fine. In fact, it's *good*: it
preserves some useful out-of-band information. It would be useful to be
able to distinguish those cases, and I don't object to extra code for
that, either.

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

      "...the rough cannot be mean and the love cannot be true, and that's
      as wise as I can get at 10 o'clock in the morning."
      	-- Bill Shatner, on being an anti-hero.


More information about the Filepro-list mailing list