comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey Creem" <jeff@thecreems.com>
Subject: Re: A little help on Generics.
Date: Mon, 24 Jun 2002 10:49:07 GMT
Date: 2002-06-24T10:49:07+00:00	[thread overview]
Message-ID: <DOCR8.55102$EP.5365@sccrnsc03> (raw)
In-Reply-To: iOyR8.304072$cQ3.16530@sccrnsc01


"Caffeine Junky" <nospam@hotmail.com> wrote in message
news:iOyR8.304072$cQ3.16530@sccrnsc01...
> So far I've got Accesses and arrays and stuff figured out. I've kinda got
> the package system figured out. But I'm having trouble figuring out how
> to use Generics. More specifically, I know how to create a generic
> package(at least the compiler doesnt give me any errors when making an
> object file).
> I just dont know the proper way to instantiate it.
>
> Heres a package spec and a test file that you guys can peak at and
> hopefully give me some hints as to what I'm doing wrong.
>
> (Please be kind, I'm still a newbie. Heh.)
>
>    declare
>
>       type Int_Stack is new genstack(Max => 500, Item => Integer);
>
>

Since you did not post the body you may have other problems here but the
first I see is the
syntax here.  Try something like

package Int_Stack is new genstack(Max => 500, Item => Integer);


Also, try to avoid the 'img attribute even in your test code..It is a handy
feature
but is not portable..It is a nice trick to have up your sleeve but it is
only a few
more kestrokes to type integer'image(ints(J)).

I there are a few more problems lurking in that test driver as well but I am
sure you will find these soon enough.






  parent reply	other threads:[~2002-06-24 10:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-24  6:15 A little help on Generics Caffeine Junky
2002-06-24  7:34 ` Dale Stanbrough
2002-06-24 10:49 ` Jeffrey Creem [this message]
2002-06-24 18:50   ` Caffeine Junky
2002-06-24 20:21     ` Jeffrey Creem
2002-06-24 22:29       ` Caffeine Junky
2002-06-25  2:52 ` SteveD
2002-06-25  7:25   ` Caffeine Junky
replies disabled

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