comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin D. Condic" <mcondic-nospam@quadruscorp.com>
Subject: Re: Question regarding package
Date: 2000/03/27
Date: 2000-03-27T14:09:12+00:00	[thread overview]
Message-ID: <38DF957B.75C1A90F@quadruscorp.com> (raw)
In-Reply-To: %JDD4.10$p52.1521@news.pacbell.net

joe Tsai wrote:
> for example if I wrote generic package call Gen_List.  I can use it with the
> following ways,
> 
> package Stuff is newGen_List(Integer);
> use Stuff;
> 
> the question is that if I can assign a package as type?
> 
> type thing is
>   .....
> 
Your question is not 100% clear - maybe you should explain a little more
about what you want to accomplish & we can help point the way.

In general, the answer to your question is "no". A package is a
conglomeration of types, objects, subprograms and tasks. Making it
generic does not really change this. A type is a definition of how to
interpret raw memory. (O.K. not *strictly* accurate, but good enough for
this purpose.) How could a type contain actual memory for objects?
Declaring new objects of that type starts getting you into a paradox of
sorts.

You might think of a generic package instantiation as a kind of object
declaration. The generic package is similar to a type and the instance
is similar to an object - a specific occurence of the general
definition. 

If you had something else in mind, post more detail and I'm sure someone
will be glad to point out that I don't know what I'm talking about. :-)

MDC
-- 
=============================================================
Marin David Condic   - Quadrus Corporation -   1.800.555.3393
1015-116 Atlantic Boulevard, Atlantic Beach, FL 32233
http://www.quadruscorp.com/
m c o n d i c @ q u a d r u s c o r p . c o m

***PLEASE REMOVE THE "-NOSPAM" PART OF MY RETURN ADDRESS***

Visit my web site at:  http://www.mcondic.com/

"Because that's where they keep the money."
    --  Willie Sutton when asked why he robbed banks. 
=============================================================




      reply	other threads:[~2000-03-27  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-26  0:00 Question regarding package joe Tsai
2000-03-27  0:00 ` Marin D. Condic [this message]
replies disabled

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