comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcqada95@earthlink.net>
Subject: Re: Data Structures
Date: Wed, 22 May 2002 11:30:10 GMT
Date: 2002-05-22T11:30:10+00:00	[thread overview]
Message-ID: <3CEB819C.CC3AC467@earthlink.net> (raw)
In-Reply-To: WKBG8.280$AJ5.86056@typhoon.ne.ipsvc.net

Jeffrey Creem wrote:
> 
> Someone probably told you that an Ada package is/can be related to a C++
> class and they
> were not entirely wrong however they are not as close as you appear to want
> them to be.
> 
> You can not have an array of a package..You are far enough away from a
> solution here that
> you really need to read your textbook before starting.
> 
> "ProLogic" <ProLogic@prologitech.ods.org> wrote in message
> news:3ceaafcd@news.comindico.com.au...
> > I'm trying to create a data structure then a dynamic array to that
> > structure.
> >
> > package Nick is
> >
> >  NickName: String := "";
> >  Hops:   Integer := 0;
> >  SignOn:  Integer := 0;
> >  Identd:  String := "";
> >  Address:  String := "";
> >  Host:   String := "";
> >  Unused:  Integer := 0;
> >  Name:   String := "";
> >
> >  VWAddress: String := "";
> >
> >  Modes:  String := "";
> >
> >  --Channels: array(positive range <>) of String := "";
> >
> >  procedure setNickName(NickName: in String);
> >
> > end Nick;
> >
> > Could someone help me with the comment code there too please? I need a
> > dynamic array of Strings
> >
> > In data.ads I have the following, which doesn't work...
> >
> >  Nicks: array (positive range <>) of Nick;
> >
> > Thanks for your help...
> >
> >

All those strings variables that you initialized to "" aren't going to
behave the way you think they're going to behave either.  Once you start
trying to set them to various values, you're going to start getting
Constraint_Errors.

Do what the man says:  Read the textbook.

Marc A. Criley
Consultant
Quadrus Corporation
www.quadruscorp.com



  reply	other threads:[~2002-05-22 11:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21 20:35 Data Structures ProLogic
2002-05-22  0:37 ` Jeffrey Creem
2002-05-22 11:30   ` Marc A. Criley [this message]
2002-05-22 14:16     ` Marin David Condic
  -- strict thread matches above, loose matches on Subject: below --
2002-07-26 10:30 Data structures Igor Gilitschenski
2002-07-29 13:46 ` Florian Weimer
replies disabled

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