Error in Array Index
Posted: Tue Dec 08, 2015 11:13 am
Roger,
We have been using a program for years that uses a 9-dim array and has had no problems. Normally only 20-30 items will be added and cleared. This is for users to clear open items in a very large file, and able to select those items to flag.
One user recently has had the need to flag 300-600 items and eventually (almost always) gets an Error in index array, and the line number is the gui read, so we get no real help on that. But we have seen other errors when selecting that also had the error, and it gives the error 326/325, or similar. Like it loses count of the array size.
Is there a limit or memory issue when there are that many memory vars in an array. (ie, 325*9), or could it be she is selecting too fast?
I may have to change it to a work file instead if I cannot fix it for these large ones.
Just some basics here..
if they delete one by double clicking one that was selected:
ADel(aRecords[1],nFound)
ASize(aRecords[1],Len(aRecords[1])-1)
if they select one:
AAdd(aRecords[1],opentkts->ticket)
(must have hit a wrong key)
if they cancel out
ADel(aRecords[1],nFound)
ASize(aRecords[1],Len(aRecords[1])-1)
So AAdd changes ASize automatically.
We use this in many programs, but not that many records.
Fred
Omni
We have been using a program for years that uses a 9-dim array and has had no problems. Normally only 20-30 items will be added and cleared. This is for users to clear open items in a very large file, and able to select those items to flag.
One user recently has had the need to flag 300-600 items and eventually (almost always) gets an Error in index array, and the line number is the gui read, so we get no real help on that. But we have seen other errors when selecting that also had the error, and it gives the error 326/325, or similar. Like it loses count of the array size.
Is there a limit or memory issue when there are that many memory vars in an array. (ie, 325*9), or could it be she is selecting too fast?
I may have to change it to a work file instead if I cannot fix it for these large ones.
Just some basics here..
if they delete one by double clicking one that was selected:
ADel(aRecords[1],nFound)
ASize(aRecords[1],Len(aRecords[1])-1)
if they select one:
AAdd(aRecords[1],opentkts->ticket)
(must have hit a wrong key)
if they cancel out
ADel(aRecords[1],nFound)
ASize(aRecords[1],Len(aRecords[1])-1)
So AAdd changes ASize automatically.
We use this in many programs, but not that many records.
Fred
Omni