in reply to Re(3): variable set to 0 ? 0 : 1
in thread variable set to 0 ? 0 : 1

The point of formatting one's code is to make the meaning clear to the reader. (...) I *think* I know what the second line does, but I'm not 100% sure.

Hmm.. While I agree that some extra parens do no harm, I somewhat oppose the thought that using a languages (well documented) feature is "criminal". Someone's lack of specific experience or routine or different minting (no offence here) is not the "fault" of those more experienced/differently originated [uh - if this is wrong english, someone /mgs me please]. In the end, wondering about such constructs teaches us in the long run, right?

Then again, I actually agree with both of you... ;) While it's perfectly ok to add "markup" for your own/teammates convenience, to me it's ok, ethically, to exploit ones abilities and the abilities of the tool one is using (ahh.. well, unless you're a sniper with a precision gun).

Smith, where Jones had had had had had had had had had had had the examiner's approval

Well, I don't mean to be pernickety (but, hell, I am ;), but I'm not sure wether this example fits, since in that sentence punctuation is not optional. In English, for good reasons, punctuation -- especially to evade ambiguity -- is mandatory, while in Perl there are clear rules how to parse an (unambigous) term. However, I still wonder what the solution to that sentence is!? ;)

So long,
Flexx

Replies are listed 'Best First'.
Re^5: variable set to 0 ? 0 : 1
by talexb (Chancellor) on Sep 07, 2002 at 22:34 UTC
    Solution:

    Smith, where Jones had had "had had", had had "had"; "had had" had had the examiner's approval.

    In other words, in the exam that they both took, in one particular question, Jones wrote "had had", and Smith wrote "had". The correct answer, according to the examiner, was Jones' "had had".

    --t. alex
    but my friends call me T.

      I, where your father had had 'had had "had had", had had "had"; "had had" had had' had 'had had "had", had had "had had"; "had had" had had'; 'had had "had had", had had "had"; "had had" had had' had had talexb's approval.... ;-P

      i.e. "I had X where your father had Y; You were expecting an answer of Y."
      X and Y are slightly different ways punctuate the original string of hads.

      -Blake

        St. Larry! Leave me alone! ;)