Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

Braces and Semicolons

A node definition consists of one or more statements. If the definition contains more than one statement, then each statement must end with a semicolon and the group of statements must be enclosed within braces. This creates a statement block. The example below contains three separate statements.

Profit:={
var sales=100;
var costs=60;
return sales-costs;
}

In JavaScript, semicolons are optional inside statement blocks. However, omitting semicolons is generally regarded as bad programming practice because it leads to code behaving in a way you did not expect. For this reason, semicolons are required in DScript statement blocks.

If the node definition contains only one statement, no braces or semicolons are required.

Profit:=Sales-Costs

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend