From ftm
Jump to: navigation, search
Line 5: Line 5:
 
An EXPRession is a sentence which can be applied to the content of an FMAT or an FVEC. It can be created in an FTM.object (class expr) or in an FTM.message.  In both case, it shares the same syntax:  
 
An EXPRession is a sentence which can be applied to the content of an FMAT or an FVEC. It can be created in an FTM.object (class expr) or in an FTM.message.  In both case, it shares the same syntax:  
  
1_ it is surrounded by simple quotes ' '
+
1_ it starts with expr
  
2_ it is then encapsulated within parenthesis (to be executed like all of FTM's code)
+
2_ it is surrounded by simple quotes ' '
  
For instance, the expression returning the value 1 is
+
3_ it is then encapsulated within parenthesis (to be executed like all of FTM's code)
  
'(1)'
+
For example, the expression returning the value 1 is
 +
 
 +
expr '(1)'
  
  
 
You can use all the [[List of functions | FTM Functions]] available to create your expression. Moreover, $1, $2, etc will be replaced by values passed to your instance of expr.
 
You can use all the [[List of functions | FTM Functions]] available to create your expression. Moreover, $1, $2, etc will be replaced by values passed to your instance of expr.
  
within ftm.mess
 
  
within a ftm.object
+
For example, the expression returning the sinus of its input is
 +
 
 +
expr '(sin $1)'
 +
 
 +
 
 +
There are two places you can create a new expr instance:
 +
 
 +
* within a ftm.object
 +
 
 +
* within ftm.mess
  
 
scope of variable
 
scope of variable

Revision as of 15:40, 5 July 2010

This is a simple reference for the EXPR class.

Creation - Elements of the call

An EXPRession is a sentence which can be applied to the content of an FMAT or an FVEC. It can be created in an FTM.object (class expr) or in an FTM.message. In both case, it shares the same syntax:

1_ it starts with expr

2_ it is surrounded by simple quotes ' '

3_ it is then encapsulated within parenthesis (to be executed like all of FTM's code)

For example, the expression returning the value 1 is

expr '(1)'


You can use all the FTM Functions available to create your expression. Moreover, $1, $2, etc will be replaced by values passed to your instance of expr.


For example, the expression returning the sinus of its input is

expr '(sin $1)'


There are two places you can create a new expr instance:

  • within a ftm.object
  • within ftm.mess

scope of variable

Context of use

Fill

Apply

Lookup

Find


Simple examples

Unity