Content deleted Content added
Deleted most second and third instances of Wiki-links to terms: "C", "C++", "Java". |
|||
Line 24:
In C, [[C Plus Plus|C++]], and [[Java programming language|Java]]:
while (''Boolean expression'') '''{'''
''statement(s)''
'''}'''
do '''{'''
''statement(s)''
'''}''' while (''Boolean expression'');
for (''initialisation'' ; ''termination condition'' ; ''incrementing expr'') '''{'''
''statement(s)''
'''}'''
=== Conditional statements ===
In C, C++, and Java:
if (''Boolean expression'') '''{'''
''statement(s)''
'''}'''
if (''Boolean expression'') '''{'''
''statement(s)''
'''}''' else '''{'''
''statement(s)''
'''}'''
switch (''integer expression'') '''{'''
case ''constant integer expr'':
''statement(s)''
Line 57:
''statement(s)''
break;
'''}'''
In [[Ruby programming language|Ruby]]:
Line 67:
In [[C Sharp programming language|C#]] and Java:
try '''{'''
''statement(s)''
'''}''' catch (exception type) '''{'''
''statement(s)''
'''}''' catch (exception type) '''{'''
''statement(s)''
'''}''' finally '''{'''
''statement(s)''
'''}'''
C++ does not have <tt>finally</tt>, but otherwise looks similar. C has nothing like this, though some compilers vendors added the keywords <tt>__try</tt> and <tt>__finally</tt> to their implementation.
|