Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^5: Situation where warning "Found = in conditional, should be" seems obsolete (documentation - C terminology)

by rsFalse (Chaplain)
on Feb 06, 2021 at 20:07 UTC ( #11127991=note: print w/replies, xml ) Need Help??


in reply to Re^4: Situation where warning "Found = in conditional, should be" seems obsolete (documentation - C terminology)
in thread Situation where warning "Found = in conditional, should be" seems obsolete

Do '&&' and '||' short-circuit in C?

>>if returns a value like the operand and

Ye, I was surprised, when if returned the result of its conditional (because it was false) and didn't proceeded to a sencence! (The long discussion about this finding was here: printing unitialized value of the 'do BLOCK')
  • Comment on Re^5: Situation where warning "Found = in conditional, should be" seems obsolete (documentation - C terminology)
  • Select or Download Code

Replies are listed 'Best First'.
Re^6: Situation where warning "Found = in conditional, should be" seems obsolete (documentation - C terminology)
by LanX (Sage) on Feb 06, 2021 at 20:15 UTC
    > Do && and || short-circuit in C?

    Yes, and Perl introduce and and or as low precedence alternatives.

    > The long discussion

    yes we had this before

    simple example

    DB<226> p do { unless (42) { } } 42 DB<227>

    Please keep in mind that "ternary operator" is not correct either, since it's a mathematical term classifying a whole family of operators with 3 operands. ? : is just the only ternary one in these languages.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-08-10 01:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?