in reply to Re^3: 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
see also https://en.wikipedia.org/wiki/Conditional_operator
The Conditional operator is supported in many programming languages. This term usually refers to ?: as in C, C++, C#, Python, and JavaScript.However, in Java, this term can also refer to && and ||
When Perl was born, C-programmers where one of the main target groups.
But as you see "Java" is doing it like you suggested.
And in Perl it's not only that
- and has the same "flow control" like if
- if returns a value like the operand and
As I said, both are implemented with the same OP-Code.
edit
At the same time we want documentation to stay concise, otherwise it's considered "too complicated"
I think adding an extra section "Control flow in conditional operators" with these deeper informations and linking to it from ?: and && or || might solve the issue.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery