From ftm
(→FTM Object Definitions) |
|||
Line 12: | Line 12: | ||
The following example defines a floating-point matrix (''fmat'' class) named ''myfmat'' and initializes it with random values: | The following example defines a floating-point matrix (''fmat'' class) named ''myfmat'' and initializes it with random values: | ||
− | [[Image:Ftm.object-obj.jpg|frame|none| | + | [[Image:Ftm.object-obj.jpg|frame|none|definition of a floating-point matrix (''fmat'' class) named ''myfmat'' initialized with random values]] |
− | definition of a floating-point matrix (''fmat'' class) named ''myfmat'' initialized with random values]] | ||
== Constant Definitions == | == Constant Definitions == | ||
Line 19: | Line 18: | ||
Constants can be defined with the ''ftm.object'' external using the ''const'' keyword: | Constants can be defined with the ''ftm.object'' external using the ''const'' keyword: | ||
* [ <'const'> ] <any: constant value> | * [ <'const'> ] <any: constant value> | ||
+ | |||
+ | [[Image:Ftm.object-const.jpg|frame|none|definition of pi as an FTM constant and a symbol constant ''label'']] | ||
For numeric constants the ''const'' keyword can be left out. | For numeric constants the ''const'' keyword can be left out. | ||
== Variable Definitions == | == Variable Definitions == |
Revision as of 15:43, 11 April 2010
The ftm.object external can be used to statically define FTM and name objects, variables and constants. The graphical external has two text fields. The object or value definition is entered into the left text field. The right field allows for defining
Additional properties such as the scope of the object's name are defined in the inspector of the external.
FTM Object Definitions
For statically defining an FTM object with the ftm.object external the following syntax is required:
- <sym: class name> <list: instantiation arguments> [ , <list: initialization message> ... ]
The following example defines a floating-point matrix (fmat class) named myfmat and initializes it with random values:
Constant Definitions
Constants can be defined with the ftm.object external using the const keyword:
- [ <'const'> ] <any: constant value>
For numeric constants the const keyword can be left out.