From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: array of strings in a function
Date: Fri, 17 Oct 2003 00:48:03 GMT
Date: 2003-10-17T00:48:03+00:00 [thread overview]
Message-ID: <3F8F3C35.7080300@comcast.net> (raw)
In-Reply-To: MWAjb.3185$s93.1153@newsread3.news.pas.earthlink.net
Jeffrey Carter wrote:
> So a negative Length is possible? And Contents (P, -27) is
> meaningful? I think Length should return Natural, and Row should be
> Positive.
I'll buy that. The functions I supplied would raise Constraint_Error
for a negative Row value. But not allowing a negative value is probably
better.
>> 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.
> Something along these lines could work, perhaps using
> Unbounded_String, but I wanted to point out to to the OP that this
> won't work as given, and needs some work.
Right, I didn't compile and test it, since I was just describing one way
to approach the actual implementation. As I said, if I were doing it
"for real" that way, I would probably use Reserved_128 or some such as a
marker.
--
Robert I. Eachus
"Quality is the Buddha. Quality is scientific reality. Quality is the
goal of Art. It remains to work these concepts into a practical,
down-to-earth context, and for this there is nothing more practical or
down-to-earth than what I have been talking about all along...the repair
of an old motorcycle." -- from Zen and the Art of Motorcycle
Maintenance by Robert Pirsig
next prev parent reply other threads:[~2003-10-17 0:48 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 [this message]
2003-10-17 18:41 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox