[futurebasic] Re: Array specification

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 1998 : Group Archive : Group : All Groups

From: Dale Blackwell <dblackwell@...>
Date: Wed, 8 Apr 1998 09:38:11 -0700
Jay wrote:
>
>I'm fascinated by all the different approaches available for this
>question. I have another using XREF that I won't go into unless
>requested. (I prefer this one.) Please do let us know what you choose.
>
Let me first thank all of those who responded to this array specification
request.  I learned a lot more about arrays than perhaps I ever will need.
However, I had to come to a workable solution in a short period of time so
I divided the problem in two.  In doing so I saved a considerable amount of
space since the 16 bytes of data were not always necessary for each of the
1000 original array nodes (i.e. DIM Grid(10,10,10).

I first cleared the Grid array to zero and then entered values into the
appropriate nodes of the Grid if the eight dimensions
(X1,Y1,X2,Y2,X3,Y3,X4,Y4) were required.  These values were indexes into
another array defined as:

DIM Map(500,16)

Note: I know that less than half the original nodes would require dimensions.

Programming then consisted of examining the Grid array for non-zero values
and using that value to locate the dimensions in the Map array.

Again, many thanks to all who responded to my question.  It's wonderful to
know that such expertise is only an email message away.

Regards and best wishes,

Dale Blackwell
dblackwell@...