If: Difference between revisions

1 byte added ,  27 October 2016
No edit summary
Line 1: Line 1:
This, adapted from Wikipedia’s article on “Conditional (computer programming)” works equally well for the legal [[if]]:
This, adapted from Wikipedia’s article on “Conditional (computer programming)” works equally well for the legal [[if]]:


===If–then(–else) ===
===The computer-code if===


The <code>if–then</code> construct (sometimes called <code>if–then–else</code>) is common across many programming languages. Although the syntax varies quite a bit from language to language, the basic structure looks like this:
The <code>if–then</code> construct (sometimes called <code>if–then–else</code>) is common across many programming languages. Although the syntax varies quite a bit from language to language, the basic structure looks like this: