On Mon, May 14, 2001 at 09:32:05AM -0400, lkeeton wrote:
[snip]
> how does it take place. For instance in this example I pass 5 it then gets to 
> the line below and evaluates value = 5 * factorial(5-1)-> right there that 
> tells me to call the function again and pass it 4 then when I get to the line 
> right below me $value  = 4 * factorial(4-1). I don't see where the actual 
> calculation takes place 5 * 4 * 3 * 2 = 120. Everytime a number gets passed I 
> feel that somehow what I have done before is gone. Can somebody walk me 
> through this very carefully so I can see what is really going on.

This is far from a MySQL question. Try a perl forum, or any
algorithm's manual.

You need to understand the basics of recursion before you can
understand that bit of code.

Greetz, Peter.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to