<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 30 Oct 2004 19:15:14 +0100 (BST)
From   : Andrew W <a.weston2@...>
Subject: Re: Dimensioned area space

In <URL:news:local.misc> on Sat 30 Oct, Richard Gellman wrote:

> >> However if I type:
> >> DIM A%-1
> >> P.A%-TOP
> >> DIM GH% 0
I should have written 'DIM A%-1' here as well

> >> P.A%-TOP
> >> I get '10'
> >> where is the memory going?
> >
> >
> > The variable GH% has to be created, whereas the variable G% is already 
> > allocated space.
> 
> To elaborate further, A%-Z% and @% are referred to as the "System 
> Integers". BASIC allocates these in a separate memory space (&400-&700 I 
> think?) so DIMing them doesn't take up memory to store that they exist.
> 
> GH% however is simply an integer (exactly the same as if you did gh%) 
> and so BASIC has to allocate memory for its name and value.
So if it takes up 3 bytes for the name and two bytes for the location
address I where are the remaining 4 bytes going?

A.Weston
-- 
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>