urjlew@ecsvax.UUCP (Rostyk Lewyckyj) (07/07/87)
[Wisdom for the line eater. For what x is x*x <> x^2 in AMIGABASIC 1.0] Included below is an Amiga BASIC program whose purpose is supposed to be to read in a packed record of 8204 integers stored as one record of a random file, and unpack the record into an array. Why I am trying to do this is irrelevant just now. What is relevant is that this program keeps getting visited by the GURU and I don't know why. CLEAR , 1030,1030 CLEAR , 40000&,2048 OPEN "R",1, "matfile", 16410 FIELD 1,16408 AS a$ LSET a$="abcd" DIM ps%(8203) ps%(0)=0 b&=VARPTR(ps%(0)) c&=b& GET #1,1 a&=SADD(a$) FOR i&=a& TO a&+16407 STEP 2 POKEW c&,PEEKW(i&) c&=c&+2 NEXT i& END I would much appreciate an explanation of why its happening. What am I doing wrong, other than trying to program in that stupid BASIC.:-) By the way the values in the record are {640,100,2,0,0,0,....}, but that shouldn't matter. -- Reply-To: Rostyslaw Jarema Lewyckyj urjlew@ecsvax.UUCP , urjlew@tucc.bitnet or post to comp.sys.amiga. Others may also be interested