comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: array of strings in a function
Date: Fri, 17 Oct 2003 18:41:32 GMT
Date: 2003-10-17T18:41:32+00:00	[thread overview]
Message-ID: <wJWjb.379$S52.274@newsread4.news.pas.earthlink.net> (raw)
In-Reply-To: <3F8F3C35.7080300@comcast.net>

Robert I. Eachus wrote:

> Jeffrey Carter wrote:
> 
>  >> type Parameter_List is String;
>  >
>  > This is not Ada. And making it "new String" won't work, either, since
>  >  Parameter_List is definite. So this proposal needs some work.
>  > Perhaps "new Unbounded_String" is better.
> 
> Oops!  SUBtype Parameter_List is String;
> 
> Or you can do "type Parameter_List is new String;"  but that requires
> writing a lot of type conversions.

No. This is the full type for

type Parameter_List is private;

so it can't be a subtype. Since a client may write

P : Parameter_List;

(Parameter_List is a definite type), "new String" won't work either. 
Perhaps you want

type Parameter_List (<>) is private;

in which case "new String" is legal, but does require conversions.

-- 
Jeff Carter
"We use a large, vibrating egg."
Annie Hall
44




      reply	other threads:[~2003-10-17 18:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-14 20:54 array of strings in a function Antonio Martínez
2003-10-15  2:55 ` Robert I. Eachus
2003-10-15  3:29   ` Jeff C,
2003-10-15  3:08 ` Jeffrey Carter
2003-10-16  6:40   ` tmoran
2003-10-16  9:31     ` Craig Carey
2003-10-16 18:13       ` Craig Carey
2003-10-16 21:44         ` Marius Amado Alves
2003-10-17 19:48           ` Craig Carey
2003-10-18 10:05             ` Marius Amado Alves
2003-10-18 20:05               ` Craig Carey
2003-10-30  9:42                 ` Craig Carey
2003-10-16 17:58     ` Jeffrey Carter
2003-10-16 20:00       ` tmoran
2003-10-17  0:51         ` Jeffrey Carter
2003-10-15 11:49 ` Antonio Martínez Álvarez
2003-10-15 12:29   ` Preben Randhol
2003-10-15 14:19   ` Ole-Hjalmar Kristensen
2003-10-16 14:30   ` Robert I. Eachus
2003-10-16 17:53     ` Jeffrey Carter
2003-10-17  0:48       ` Robert I. Eachus
2003-10-17 18:41         ` Jeffrey Carter [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