>The error I'm getting is "Subscript is outside defined range". I don't understand, why. I think, it's a bug in ASCAN function.
>
>Why
>
>? ascan(laRelations, m.lcTable, 2, ;
> m.lnRelations, 4, 8)
>
>would return this error? lnRelations = 222. E.g. I can search from the first element, but I can not search starting from the second. Doesn't make any sense to me.
>
I found that I have to subsctract the number from the nElementsSearched, e.g.
? ascan(laRelations, m.lcTable, m.lnI, ;
m.lnRelations - m.lnI, 4, 8)
works.
I would never have guessed that I need to substract this number and the Help is not explicit about it. Besides, I believe, I used that syntax without substracting before...
If it's not broken, fix it until it is.
My Blog