Subject: | |
From: | |
Reply To: | |
Date: | Sun, 10 Jan 2010 20:33:12 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On 10/01/2010 8:08 PM, Roy Brown wrote:
>
> And yes, I know this second paragraph was a joke. But the first one
> was a joke too, right?
>
> You know the given rules of precedence mean that
> A AND B OR C
> should be parsed as
> (A AND B) OR C
> and you don't really believe there (sic) is/was any ambiguity? Do you?
No not necessarily, but I also don't turn into a "raving lunatic" (that
is a joke) about whether or not something is right or wrong. I was
taught defensive programming, just like defensive driving and you work
to not have these types of issues so I would have naturally used the
brackets. Your example is simplified, the beginning example from Walter
had "A" being it's own expression. While this should not negate how the
expression is evaluated it is an important note.
if (a=553 and b=123) or c=3
if a=553 and b=123 or c=3
The first example is clearer in terms of readability. However, the
parser should have detected the "or" at the end, but the CI doesn't
parse that way. With any language the documentation is king, and having
said that I think you should throw out your version of Oxford because
irregardless is NOT a word. I'm not really to hung up on right or wrong,
I'm looking for what is clear to the reader and I think the first
example is clearer:
What about?
if a=553 and (b=123 or c=3)
Should the above be implied? Can it be? Is there ambiguity now?
Neil
>
> Best Regards
>
>
> Roy
>
>
>
>
--
Neil Armstrong [log in to unmask]
"Cyclocross was the only sport that made Chuck Norris cry"
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|