Content deleted Content added
Moggie2002 (talk | contribs) Add the origins from BCPL, note that PHP botched the implementation of this operator |
Moggie2002 (talk | contribs) m Added reference to BCPL grammar |
||
Line 1:
{{Unreferenced|date=November 2007}}
'''<code>?:</code>''' is a [[ternary operator]] that is part of the syntax for a basic [[conditional statement|conditional expression]] in several [[programming language]]s including [[C (programming language)|C]], [[Objective-C]], [[C++]], [[C Sharp (programming language)|C#]], [[D programming language|D]], [[Java (programming language)|Java]], [[JavaScript]], [[Linoleum programming language|Linoleum]], [[Perl]], [[PHP]], [[Tcl]], [[Ruby programming language|Ruby]], and [[Verilog]]. Its origin comes from [[BCPL]], whose equivalent syntax for E1 ? E2 :E3 was E1 -> E2, E3<ref>[http://cm.bell-labs.com/cm/cs/who/dmr/bcpl.pdf BCPL Reference Manual (see page 15)]</ref>. Languages derived from BCPL tend to feature this operator.
==Conditional assignment==
|