Si es posible con EVALUATE(). Como VFP no
tiene la función Factorial, la debes crear como una UDF.
El ejemplo completo:
N = 5
r = 2
*-- formula: n! / r! * (n-r)!
lc = "FACTORIAL(n) / FACTORIAL(r) * FACTORIAL(n-r)"
? EVALUATE(lc)
FUNCTION Factorial(tcN)
IF tcN = 1
RETURN 1
ELSE
tcN = tcN * Factorial(tcN-1)
ENDIF
RETURN tcN
ENDFUNC
Luis María Guayán
Tucumán, Argentina
_______________________________
Comunidad Visual FoxPro en Español
http://comunidadvfp.blogspot.com