From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,51ab506286e54a43 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Subtypes do not Statically Match Date: 1999/07/01 Message-ID: <7lfvnr$fmj$1@nnrp1.deja.com>#1/1 X-Deja-AN: 496021375 References: <377A8C1A.6EFE0FF7@boeing.com> X-Http-Proxy: 1.0 x22.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Thu Jul 01 14:59:15 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-07-01T00:00:00+00:00 List-Id: In article <377A8C1A.6EFE0FF7@boeing.com>, John Harbaugh 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.