Difference between revisions of "Summary of Programming Constructs"
Line 63: | Line 63: | ||
|[[For_and_While_Loops#For_i_:.3D_a_Do_expr|For i := a Do expr]] | |[[For_and_While_Loops#For_i_:.3D_a_Do_expr|For i := a Do expr]] | ||
|- | |- | ||
− | | <code>\ e</code> | + | | <code>\e</code> |
| Creates a reference to the value of expression <code>e</code>. | | Creates a reference to the value of expression <code>e</code>. | ||
|[[References and Data Structures]] | |[[References and Data Structures]] | ||
Line 71: | Line 71: | ||
|[[References and Data Structures]] | |[[References and Data Structures]] | ||
|- | |- | ||
− | | <code># r</code> | + | | <code>#r</code> |
| Returns the value referred to by reference <code>r</code>. | | Returns the value referred to by reference <code>r</code>. | ||
|[[References and Data Structures]] | |[[References and Data Structures]] | ||
Line 77: | Line 77: | ||
==See Also== | ==See Also== | ||
+ | * [[Using References]] | ||
+ | |||
<footer>Procedural Programming Example / {{PAGENAME}} / Begin-End for Grouping Expressions</footer> | <footer>Procedural Programming Example / {{PAGENAME}} / Begin-End for Grouping Expressions</footer> |
Revision as of 03:30, 5 January 2016
Please see the table below for a list of Analytica programming constructs, their meanings, and links to references with more details, if available.
Construct | Meaning: | For more, see |
---|---|---|
e1; e2; … ei
|
Semicolons join a group of expressions to be evaluated in sequence | Begin-End for Grouping Expressions |
BEGIN e1; e2; …
|
A group of expressions to be evaluated in sequence | Begin-End for Grouping Expressions |
(e1; e2; … ei)
|
Another way to group expressions | Begin-End for Grouping Expressions |
m .. n
|
Generates a list of successive integers from m to n
|
Functions Expecting Atomic Parameters |
Var x := e
|
Define local variable x and assign initial value e
|
Defining a Local Variable |
Index i := e
|
Define local index i and assign initial value e
|
Local Indexes |
x := e
|
Assigns value from evaluating e to local variable x .
Returns value |
Assigning to a Local Variable |
While Test Do Body
|
While Test is True, evaluate Body and repeat.
Returns last value of |
While(Test) Do Body |
{ comments }
/* comments */ |
Curly brackets { } and /* */ are alternative ways to enclose comments to be ignored by the parser. | Procedural Programming Example |
'text'
"text" |
You can use single or double quotes to enclose a literal text value, but they must match. | Text values |
For x := a DO e
|
Assigns to loop variable x , successive atoms from array a and repeats evaluation expression e for each value of x .
Returns an array of values of |
For i := a Do expr |
For x[i, j…] := a DO e
|
Same, but it assigns to x successive sub-arrays of a , each indexed by the indices, [i, j …
|
For i := a Do expr |
\e
|
Creates a reference to the value of expression e .
|
References and Data Structures |
\ [i, j …] e
|
Creates an array indexed by any indexes of e other than i, j … of references to sub-arrays of e each indexed by i, j ….
|
References and Data Structures |
#r
|
Returns the value referred to by reference r .
|
References and Data Structures |
See Also
Comments
Enable comment auto-refresher