JSL is a programming language with C/Java-style syntax embedded in the JMP graphical data exploration and statistics software from SAS Inc.
Syntax
JSL uses a syntax similar to c or java with semicolons as statement terminators. Unlike C or Java, it does not use braces ({}
) to distinguish statement opening or closing blocks, but simply uses parentheses (()
) based on the notion that "everything is an expression." Variable and function names are also case-insensitive in most contexts.
For example, JSL does not distinguish between a conditional-operator in an expression and an if
statement, e.g.:
// comparable to this C code: result = (x==0) ? -1 : (x+1)
result = If(x==0, -1, x+1);
/* comparable to this C code:
if(x<0) {
x -= 3;
} else if (x==0) {
x = 0;
} else {
x += 3;
} */
If(x<=0,
x -= 3
, /* implicit else if */ x==0,
x = 0
, /* implicit else clause */
x += 3
);