Question about checks for min and max values
Kenneth Brody
kenbrody at bestweb.net
Mon Jul 25 10:31:12 PDT 2005
Quoting Nancy Palmquist (Mon, 25 Jul 2005 13:11:47 -0400):
> Jay R. Ashworth wrote:
[...]
> > The semantics of "=" are *very* well defined in the discipline of
> > programming language design, and language designers override them at
> > their peril. Spelling it differently (ie: "eq") doesn't *really* get
> > you off the hook.
>
> The correct mathematical definition for a IF line "eq" or slang "=" is
> equivalent. Equivalent is not the same as Equal
[...]
> On an Equalalent comparison, two values are compared and determined
> equivalent. It does not mean they are equal, the rules are different,
> as many have come to terms with in filePro, but I do not see the filePro
> rules as violating the mathematical definition of equivalent. An
> equivalent comparison is usually a one to one comparison of two values,
> until you run out of things to compare (literal equivalent). Or a
> numeric equivalent compares two values to see if they are equal. This
> comparison requires them to be changed to like types (same edit) and
> then compared. This is the issue. Changing different typed values to
> the same type, may corrupt the number minutely, but enough to cause the
> comparison to be misleading. For example, "0" might change to
> ".00000000001" very close but not the same.
And, technically, "0.0" and "0.00" are not equal due to the difference
in precision.
> Keep this in mind and watch the edits you use to make sure all
> arithmetic is using appropriate edits. Never use $ or # edits in an
> arithmetic statement, it will mess you up. These are literal edits for
> formating output not storing numbers.
True. While these edits accept numbers, they are not numeric fields
and do not compare numerically.
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list