Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Multi-stage flip-flop?

by RonW (Parson)
on Dec 11, 2014 at 01:47 UTC ( [id://1110001]=note: print w/replies, xml ) Need Help??


in reply to Re: Multi-stage flip-flop?
in thread Multi-stage flip-flop?

Within the same block, .. conditionX associates with the nearest condition1 .. condition2 lexically above it. So in:

if (cond1 .. cond2) { if ( .. condA) { } } if ( .. cond3) { } if (cond4 .. cond5) { if (condB .. condC) } if ( .. cond6) { }

.. cond3 would associate with cond1 .. cond2

.. condA would not, because its in a different block (it would be an orphan)

.. cond6 would associate with cond4 .. cond5 (it would not "see" condB .. condC because that is in a different block)

In terms of parsing, the handler for .. conditionX would search backwards until it found a conditionV .. conditionW or the beginning of the block. Then the conditionV .. conditionW would be "informed" of the .. conditionX

(Updated to add paragraph about parsing)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1110001]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (9)
As of 2024-04-19 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found