comp.lang.ada
 help / color / mirror / Atom feed
From: jmatthews@nova.wright.edu (Dr. John B. Matthews)
Subject: Re: Implementing pointers to pointers in Ada
Date: 1996/09/12
Date: 1996-09-12T00:00:00+00:00	[thread overview]
Message-ID: <1996Sep12.144206@nova.wright.edu> (raw)
In-Reply-To: 3235E2C3.636F@itg-sepg.logicon.com


In article <3235E2C3.636F@itg-sepg.logicon.com>, David Shochat <shochat@itg-sepg.logicon.com> writes:

> John Herro wrote:
>> Of course, it's not obvious WHY you want to use two levels of indirection.

> It was necessary for 68K Mac programming (I don't know about PPC). The
> OS had to be able to move heap objects around whenever memory got tight,
> so the programmer would access most GUI objects through a so-called
> "handle" which was a pointer to a "master" pointer to the actual data.

MacOS on PPC uses the same interface for memory management as 68K,
although the implementation has changed considerably:-) I recently
had the pleasure of working on MacOS bindings for GNAT on MacOS
with MachTen. The bindings rely extensively on declarations such as

   type ObjectRec is 
      record
         ...
      end record;
   type ObjectPtr is access ObjectRec;
   type ObjectHdl is access ObjectPtr;

The ObjectHdl.all.all syntax looks strange at first, but MacOS
programmers at a recent trade show seemed to have no trouble
following the sample code we showed them.

John
----------------------------------------------------------------
Dr. John B. Matthews
jmatthews@nova.wright.edu; john_matthews@ccmail.dayton.saic.com
"Whom the gods would destroy, they first invite to program in C"





  parent reply	other threads:[~1996-09-12  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-09  0:00 Implementing pointers to pointers in Ada Vasilios Tourloupis
1996-09-09  0:00 ` Jonas Nygren
1996-09-09  0:00 ` John Herro
1996-09-10  0:00   ` David Shochat
1996-09-11  0:00     ` Larry Kilgallen
1996-09-12  0:00     ` Dr. John B. Matthews [this message]
1996-09-13  0:00       ` Better MacOS Handles through Ada (was: Implementing Pointers to Pointe Larry Kilgallen
1996-09-14  0:00         ` Dr. John B. Matthews
1996-09-15  0:00           ` GUI Generators and Class Libraries (was: Better MacOS Handles Larry Kilgallen
1996-09-15  0:00             ` jim hopper
1996-09-16  0:00               ` Larry Kilgallen
1996-09-17  0:00                 ` GUI Generators and Class Libraries (wa David Kristola
1996-09-17  0:00                 ` GUI Generators and Class Libraries Dr. John B. Matthews
1996-09-09  0:00 ` Implementing pointers to pointers in Ada Norman H. Cohen
1996-09-09  0:00 ` Samuel Tardieu
1996-09-09  0:00 ` Mark A Biggar
1996-09-10  0:00 ` John Demby
1996-09-10  0:00   ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox