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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,413069df09dfed26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!news.cs.univ-paris8.fr!news.zanker.org!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Converting Date: Wed, 29 Dec 2004 20:07:42 +0100 Organization: None Message-ID: <2314050.v0t5R7queB@linux1.krischik.com> References: <1104260481.548435.238280@f14g2000cwb.googlegroups.com> Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1104347407 02 14040 +-asrBm13qifRAE 041229 19:10:07 X-Complaints-To: usenet-abuse@t-online.de X-ID: rG7hUcZpYev2+hZZHw53t7gRoKG3Sa66GIu-C5ashPTz6Jv42NZE8g User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:7307 Date: 2004-12-29T20:07:42+01:00 List-Id: conradwt@runbox.com wrote: > Hi, I was wondering, could someone tell me the best way to convert s > string literal to a subtype. For example, > > subtype A_Type.String is Standard.String; > subtype B_Type_String is A_Type.String; subtype don't need to be converted. Read: Programming:Ada:Subtypes#type_vs._subtype > Now, I would like to convert a string literal to B_Type_String. BTW, > the method that I'm calling requires the type B_Type_String. Last but > least, I using the most recent version of gnat to do the compile. If > anyone has any ideas as to the best way to resolve this issue and > reducing the number of code changes, I would be most appreciative. > Thanks in advance, Read: http://en.wikibooks.org/wiki/Programming:Ada:Subtypes#Converting_Data Checked convertion works on arrays as well Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com