From ftm
(→Parenthesis) |
|||
Line 5: | Line 5: | ||
The syntax is basically always the same appart from minor context dependent details. | The syntax is basically always the same appart from minor context dependent details. | ||
+ | |||
+ | == Values and Lists == | ||
+ | |||
+ | The values of FTM expressions can be int, float, symbol or references to FTM object. | ||
+ | They values can be represended by the following terms: | ||
+ | * a simple value (int, float, symbol) | ||
+ | * a named value such as $x or $myobj or $myconst | ||
+ | * an element | ||
+ | |||
+ | Examples of simple values are | ||
+ | * 1 ... an int | ||
+ | * -2 ... an int | ||
+ | * 2.3 ... a float | ||
+ | * -4 ... a loat | ||
+ | * 1.4e-4 ... a float | ||
+ | * .0 ... a float | ||
+ | * three ... a symbol | ||
+ | * 1-2 ... a symbol (because no space!) | ||
== Parenthesis == | == Parenthesis == | ||
Line 11: | Line 29: | ||
Inside parenthesis you'd have either one | Inside parenthesis you'd have either one | ||
− | * a | + | * a value (in which case the parenthesis are useless) |
* a simple infix expression | * a simple infix expression | ||
* a simple prefix expression | * a simple prefix expression |
Revision as of 12:07, 6 June 2007
FTM expressions are used in the following contexts
- the FTM message box (ftm.mess)
- the FTM definition (ftm.object)
- the expr class/object
The syntax is basically always the same appart from minor context dependent details.
Values and Lists
The values of FTM expressions can be int, float, symbol or references to FTM object. They values can be represended by the following terms:
- a simple value (int, float, symbol)
- a named value such as $x or $myobj or $myconst
- an element
Examples of simple values are
- 1 ... an int
- -2 ... an int
- 2.3 ... a float
- -4 ... a loat
- 1.4e-4 ... a float
- .0 ... a float
- three ... a symbol
- 1-2 ... a symbol (because no space!)
Parenthesis
Parenthesis in FTM expressions, '(' and ')', always will (try to) evaluate the contained elements to a single value.
Inside parenthesis you'd have either one
- a value (in which case the parenthesis are useless)
- a simple infix expression
- a simple prefix expression