Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!mcnc!ecsvax!urjlew
From: urjlew@ecsvax.UUCP (Rostyk Lewyckyj)
Newsgroups: comp.sys.amiga
Subject: A BASIC question
Message-ID: <3496@ecsvax.UUCP>
Date: Mon, 6-Jul-87 21:28:55 EDT
Article-I.D.: ecsvax.3496
Posted: Mon Jul  6 21:28:55 1987
Date-Received: Wed, 8-Jul-87 01:47:00 EDT
Organization: UNC Educational Computing Service
Lines: 35
Keywords: AmigaBASIC


 [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