answersLogoWhite

0


Best Answer

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

7y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
ReneRene
Change my mind. I dare you.
Chat with Rene
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran

Add your answer:

Earn +20 pts
Q: How do you find factorial in fox pro?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions