4D v18

formula.call( )

Home

 
4D v18
formula.call( )

formula.call( )  


 

The formula.call( ) method executes the formula object to which it is applied and returns the resulting value. The formula object can be created using the Formula or Formula from string commands.

In the thisObj parameter, you can pass a reference to the object to be used as This within the formula.

You can also pass values to be used as $1...$n parameters in the formula using the optional params parameter(s).

Note that formula.call( ) is similar to formula.apply( ) except that parameters are passed directly.

 $f:=Formula(Uppercase($1))
 $result:=$f.call(Null;"hello") // returns "HELLO"

 $o:=New object("value";50)
 $f:=Formula(This.value*2)
 $result:=$f.call($o// returns 100



See also 

formula.apply( )

 
PROPERTIES 

Product: 4D
Theme: Formulas

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v18)