opps. Bump either of the for/endfor by one (1) to create the error.
>The code below creates an error 1308: Insufficient stack space. The help says:
>One of the following has occurred:
>Your program is too recursive.
>Your program is too complex and is nested too deeply.
>An error in Visual FoxPro.
>
>I think I got the magic number of 80 before causing the error. I did not find this number in the VFP help. I just want to confirm if this is the case.
>
>
>create cursor test (f1 i, fld2 i)
>insert into test values (1,2)
>filterString = ''
>for i = 1 to 75
> filterString = filterString + iif(empty(filterString),'',' and ') + ' f1 = ' + transform(i)
>endfor
>for i = 1 to 5
> filterString = filterString + iif(empty(filterString),'',' and ') + ' fld2 = ' + transform(i)
>endfor
>wait window transform(len(filterString))
>wait window transform(occurs('AND',upper(filterString)))
>set filter to &filterString
ramil
~~ learning to stand still