Fergal Moran wrote:
> > i keep hearing recursion should be avoided whiled devin' up
> > an app. what
> > exactly does this mean? don't call too many loops or
>
> In order to define recursion we must first define recursion
> Recursion simply means a function that calls itself -
>
> like this
>
> void foo(int a){
> if (a){
> //do some stuff with a
> foo(a);
> }
> }
>
> The reason that people don't like it is that you can blow your stack if you
> are not careful
Most recursive functions written by beginning programmers are "tail recursion",
where
the function doesn't call itself until near the end. Almost all of these can
be handled
iteratively with a for(;;) or while() loop, and do not actually require
recursion.
--
Adam Wozniak Senior Software Design Engineer
Surveyor Corporation
[EMAIL PROTECTED] 4548 Broad Street
[EMAIL PROTECTED] San Luis Obispo, CA 93401
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/