Content deleted Content added
m Date/fix the maintenance tags or gen fixes using AWB |
I think this deserves some mention. It could probably be said better, but it's better than saying nothing. |
||
Line 37:
====C++====
In [[C++]] there are conditional assignment situations where use of the ''if-else'' statement is not possible, since this language explicitly distinguishes between [[initialization]] and [[assignment]]. In such case it is always possible to use an inline function call, but this is cumbersome and inelegant. Use
<source lang="c">
#include <iostream>
Line 58:
In this case there's no possibility to replace the use of ?: operator with '''if-else''' statement. (Although we can replace the use of ?: with a call to a custom inline function, inside of which can be an ''if-else'' statement.)
====[[Python (programming langage)|Python]]====
The Python programming language uses a different syntax for this operator:
<source lang="python">value_when_true if condition else value_when_false</source>
===Result type===
|