Eric J. Roode on Wed, 20 Feb 2002 17:32:20 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: help! (fwd)


At 04:11 PM 2/20/2002 -0500, Sean wrote:
...
Third, unless they are stripping out the space before comparison, that's
one of the major flaws with their approach.
Fourth, they should be using eq, not ==. That's the real bug.
Numerically, all of these zip codes, since they begin with a letter,
will == 0, and 0 == 0.


I'd also like to point out that there is a precedence problem, at least in the pseudocode that was originally posted:

if(country eq 'CA' and in_range(zip, 'A1A1A1', 'S9Z9Z9') or   in_range(zip,
'X1A1A1', 'Y9Z9Z9'))

This translates roughly to:
    "If the country is Canada and the zip is between 'A1A1A1' and 'S9Z9Z9' ...
     OR the zip is between 'Z1A1A1' and 'Y9Z9Z9' REGARDLESS of country"

which is almost certainly not the author's intent.


**Majordomo list services provided by PANIX <URL:http://www.panix.com>** **To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**