comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: Subtypes do not Statically Match
Date: 1999/07/01
Date: 1999-07-01T00:00:00+00:00	[thread overview]
Message-ID: <7lfvnr$fmj$1@nnrp1.deja.com> (raw)
In-Reply-To: 377A8C1A.6EFE0FF7@boeing.com

In article <377A8C1A.6EFE0FF7@boeing.com>,
  John Harbaugh <john.s.harbaugh2@boeing.com> wrote:

>    type Object(Max : Positive) is tagged record
>       Component : aliased String(1..Max);
>    end record;
>
>    type String_Ref is access all String;
...
>    function The_Handle(Obj : access Object) return String_Ref is
>    begin
>       return Obj.Component'access;
>       --Error: object subtype must statically match designated subtype
>    end;

Why don't you just use the routines in Ada.Strings to perform this
function? I don't see anything you are doing that couldn't be done that
way, and you wouldn't have to debug the translation routines.

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




  parent reply	other threads:[~1999-07-01  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-30  0:00 Subtypes do not Statically Match John Harbaugh
1999-06-30  0:00 ` James S. Rogers
1999-07-01  0:00   ` John Harbaugh
1999-07-02  0:00     ` Robert I. Eachus
1999-07-01  0:00 ` Ted Dennison [this message]
1999-07-01  0:00 ` Gautier
1999-07-01  0:00   ` John Harbaugh
1999-07-01  0:00 ` Robert A Duff
replies disabled

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