>I have wrote a function to quick-sort' an array of objects, but when the array is a bit larger (~600), I receive an "Allowed DO nesting level exceeded." error message.
>
>I do not have any do-loop included in another do-loop, but maybe it still counted when a do-loop is included in my recursive function...
>
>Is it posible to remove this limitation, or must I rewrite my recursive function?
>
>Thanks,
>Jimi
Jimi,
It is my understanding that there is a "stack" (LIFO) for subroutine/function calls. Every time you call a program, the previous program is pushed onto the stack. Every time a program RETURNs, the previous program is pulled from the stack. It makes no difference whether the same program is called several times, or different programs are called. This is one potential problem of recursive functions.
VFP allows 128 levels; when you reach your recursive functions, some levels may be used already.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)