March 2001
Intermediate to advanced
400 pages
8h 35m
English
A Sling program is a series of statements:
statements = statement statement*;
These statements may be either assignment statements, for statements, or plot statements:
statement = assignment | forStatement | plotStatement;
assignment = variable '=' expression ';' ;
plotStatement = "plot" expression ';';
forStatement =
"for" '(' variable ',' expression ',' expression ')'
'{' statements '}';
A variable is any unreserved word; the reserved words in Sling are the elements shown in Figure 16.12.
variable = Word;
Expressions in Sling allow for normal arithmetic manipulation:
expression = term (plusTerm | minusTerm)*; plusTerm = '+' term; minusTerm = '-' term; term = element (timesElement | divideElement | remainderElement)*; ...
Read now
Unlock full access