answersLogoWhite

0

FoxPro doesn't have any special factorial function, so you would have to write your own factorial function. It's fairly easy, for example:

function factorial

lparameters n

result = 1

for i = 1 to n

result = result * n

next

return result


If you have an older version of FoxPro, you may need to replace "lparameters" by "parameters".


Or even simpler, with recursion:


function factorial

lparameters n

return iif(n<=1, n, n*factorial(n-1))


User Avatar

Wiki User

8y ago

What else can I help you with?