I found something odd about VARPTR.

I have a matrix of strings A$(x) where x is 0 to 2 for example.

If I use the statement:
K=VARPTR(A$(S)):F=256*PEEK(K+2)+PEEK(K+1)

to derive the location for the data in memory, I get incorrect results.

If however I do this:
F=0:K=VARPTR(A$(S)):F=256*PEEK(K+2)+PEEK(K+1)

for some strange reason, specifying F=0 first fixes the problem.

Any ideas as to why that is the case?  Seems to only be a problem with
matrices.

thx
Steve

Reply via email to