Typed vs literal compares (was Re: Problem with INSTR())
Kenneth Brody
kenbrody at bestweb.net
Thu Feb 16 14:28:55 PST 2006
Quoting Brian K. White (Thu, 16 Feb 2006 17:16:00 -0500):
[...]
> I was amazed and dismayed to discover that "1" eq "12345" (or maybe the
> other way around, or both...)
[...]
That's true for string literals, but not true for numeric fields.
ie:
If: "1" eq "12345"
will be "true", but:
xx(1,.0) = "1"
If: xx eq "12345"
will be "false"
Just as:
If: "02/16/2006" eq "2006/02/16"
is "false", but:
xx(10,mdyy/) = "02/16/2006"
yy(10,yymd/) = "2006/02/16"
If: xx eq yy
will be "true".
--
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