<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 31 Oct 2004 17:08:01 +0000 (GMT)
From   : Jeremy C B Nicoll <Jeremy@...>
Subject: Re: Dimensioned area space

In article <Marcel-1.53-1031164031-313zokP@...>,
   Andrew W <a.weston2@...> wrote:
> In <URL:news:local.misc> on Sun 31 Oct, Darren Izzard wrote:
> > 
> > >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?
> > 
> > The 32-bit value (4 bytes).
> > 
> Yes that's what Jeremy said. I don't see why GH% has a value though
> when it's the name of a dimensioned area. Surely it just needs the
> location address I would have thought. Apparently not ;-)

You're getting confused.  The "location address" IS the integer value.
But the interpreter also has to store a list of names of variables and
a pointer to where the value of the variable is.  When a program
mentions "GH%" the interpreter searches the list of "G"-variables one
by one until it finds the entry which contains "H%".  The entry has a
2-byte pointer to another location which contains the 4-byte value of
GH%.  I think.

-- 
Jeremy C B Nicoll - my opinions are my own.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>