From: Peter Chapin <PChapin@vtc.vsc.edu>
Subject: Re: unconstrained subtype in component declaration
Date: Sun, 27 Jul 2014 11:21:52 -0400
Date: 2014-07-27T11:21:52-04:00 [thread overview]
Message-ID: <59ydnUNZAP-MhEjORVn_vwA@giganews.com> (raw)
In-Reply-To: <lr34tq$air$1@speranza.aioe.org>
On 2014-07-27 11:13, Victor Porton wrote:
> As I've told in my previous thread in c.l.a, I want a function to return two
> values.
>
> A fragment of my real code:
>
> type Filename_And_Fragment is
> record
> Filename: String;
> Fragment: String;
> end record;
>
> function URI_String_To_Filename_And_Fragment(Str: String) return
> Filename_And_Fragment;
>
> rdf-raptor-uri.ads:63:20: unconstrained subtype in component declaration
>
> The compiler does not accept this. What to do? (I do not want to create a
> full fledged object with access-to-String fields and Get_*() accessors and
> Unchecked_Deallocation in finalization.)
What about using type Unbounded_String in package Ada.Strings.Unbounded?
Peter
next prev parent reply other threads:[~2014-07-27 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-27 15:13 unconstrained subtype in component declaration Victor Porton
2014-07-27 15:21 ` Peter Chapin [this message]
2014-07-27 15:27 ` Victor Porton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox