Hi,
Trying my hand at recursive functions and found a simple recursive function for factorials and found this online :
I don't understand how this works. When num eventually reaches 1 won't the function return 1 instead of the complete factorial ?![]()
Function myfact(num As Long) As Long If num = 1 Then myfact = 1 Else myfact = num * myfact(num - 1) End If End Function
Thanks,
amphi
Bookmarks