14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

72 JSL Building Blocks Chapter 5<br />

JSL Syntax Rules<br />

Semicolons<br />

• Parentheses also mark the end of a function name, even when arguments are not needed. For example,<br />

the Pi function has no arguments. However, the parentheses are required so that JMP can identify Pi as<br />

a function.<br />

Pi();<br />

Note: Be careful that parentheses match. Every ( needs a ), or errors result.<br />

The script editor can match fences (parentheses, brackets, and braces). Press CTRL-] (COMMAND-b on<br />

Macintosh) with your cursor in any part of a script. The editor searches for fences, highlighting the text<br />

between the first set of opening and closing fences that it finds. Repeat this process to highlight the<br />

next-higher fence. See “Match Parentheses, Brackets, and Braces” on page 51 in the “<strong>Scripting</strong> Tools” chapter<br />

for an example.<br />

Expressions separated by a semicolon are evaluated in succession, returning the result of the last expression.<br />

In the following code, 0 is assigned to the variable i and then 2 is assigned the variable j.<br />

i=0;<br />

j=2;<br />

You can also use semicolons to join arguments that are separated by commas as shown in the following If()<br />

expression.<br />

If(x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!