From: lanceedmonds@SPAMLESS.xtra.co.nz (Lance Edmonds)
Subject: Re: Dim absolute:
d83@ath.forthnet.gr (Don Schullian) wrote:
>You're thinking too hard...
>
> If you just need some memory area and you don't care where it is except
that
>it doesn't utilize memory already in use then just DIM an array. You don't
>want to use ABSOLUTE.
Actually, DIM ABSOLUTE can be very useful for creating a psuedo UNION
between two arrays. For example, I use it to create a string array
MyArray(0) as string * 32750)
then "map" an integer array over the top of it of 16325 members using
DIM ABSOLUTE MyIntArray(0:16324) at varseg(MyArray(0))
(off the top of my head, YMMV).
This way I can use integers in say, an index table, but still save
the array using a PUT$ #1, MyArray(0) rather than using BSAVE. Makes
loading index tables much faster.
This idea can be extended to all sorts of places. Very useful.
Regards,
Lance.
==============================
Lance Edmonds, Email contacts:
100354.1645@compuserve.com
Lance_Edmonds@compuserve.com
lanceedmonds@xtra.co.nz
==============================
Please remove "SPAMLESS." when
replying by email.
==============================
*** QwkNews (tm) v2.1
* [TN71] Toast House Import
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)
|