Do you have to use Eval() to call a function name contained in a variable?
Posted: Thu Aug 22, 2024 8:50 pm
Hi,
Is there an official method other than Eval and a Code Block, or Macro Expansion "&", to call a function name contained in a variable?
So if you have a function defined with 2 parameters like
Function ThisProc( sParameter_01, sParameter_02 )
Local bReturnCode := .F.
If (condition)
bReturnCode := .T.
EndIf
Return bReturnCode
, and you place the function name and array of parameters into variables like this:
sProc := "ThisProc"
aParameters := { sParameter_01, sParameter_02 }
, what is the recommended way to call the function using these 2 variables sProc and aParameters?
Is there an official method other than Eval and a Code Block, or Macro Expansion "&", to call a function name contained in a variable?
So if you have a function defined with 2 parameters like
Function ThisProc( sParameter_01, sParameter_02 )
Local bReturnCode := .F.
If (condition)
bReturnCode := .T.
EndIf
Return bReturnCode
, and you place the function name and array of parameters into variables like this:
sProc := "ThisProc"
aParameters := { sParameter_01, sParameter_02 }
, what is the recommended way to call the function using these 2 variables sProc and aParameters?