Loop causing inexlicably "Index out of range for wave CU_AA"-error
Fri, 10/03/2014 - 05:02 pm
I have encountered a strange problem that I can not figure out:
The following code should be used to compare a List of amino acids with a user-defined input sequence. The found values shall be written to a wave CU_AA, which should be enlarged by 1 whenever a new matching amino acid is found.
TransientActiveAA = AA_OLC [c]
// Compare Transient active AA and active AA:
// If equal
Wave /T CU_AA
Make /O /T /N=1 CU_AA
CU_AA  = Codons [c]
Redimension /N=(numpnts(CU_AA)+1) CU_AA
Variable test = numpnts(CU_AA)
CU_AA [test] = TheValue
On the second run of the loop, the program stops - error code: "Index out of range for wave CU_AA"
This I cannot understand, since the index normally changes from 1 (
Make command) to 2 (
Where is the bug?
Thanks in advance for any help!