comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <martin@krischik.com>
Subject: Re: Converting
Date: Wed, 29 Dec 2004 20:07:42 +0100
Date: 2004-12-29T20:07:42+01:00	[thread overview]
Message-ID: <2314050.v0t5R7queB@linux1.krischik.com> (raw)
In-Reply-To: 1104260481.548435.238280@f14g2000cwb.googlegroups.com

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



      parent reply	other threads:[~2004-12-29 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-28 19:01 Converting conradwt
2004-12-28 21:12 ` Converting Martin Dowie
2004-12-28 22:52 ` Converting Nick Roberts
2004-12-29  4:43 ` Converting Jeffrey Carter
2004-12-29  5:06 ` Converting Lady Chatterly
2004-12-29 19:07 ` Martin Krischik [this message]
replies disabled

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