Semicolon

From NWN Lexicon
Revision as of 11:28, 21 August 2012 by Dood (talk | contribs) (Created page with "=Semicolon= Semicolons are used to end a logical line in a statement. A logical line is called logical because it can span across multiple real lines to increase readabilit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Semicolon

Semicolons are used to end a logical line in a statement. A logical line is called logical because it can span across multiple real lines to increase readability.


The start and end of code block statements, with the exception of code block delimiter .


int bCondition = TRUE; // single line statement
if (bCondition)
     PrintString("bCondition is TRUE."); // multiline statement
// below should be handled with "else if" instead
if (!bCondition)
{
     // multiple statements in a code block
     PrintString("bCondition is FALSE.");
     bCondition = TRUE;
}




 author: Charles Feduke, editor: Jasperre, additional contributor(s): Ryan Hunt, Frank Succardi, Heikki