comp.lang.ada
 help / color / mirror / Atom feed
* Re: pre-defined function convert hex to decimal?
@ 2002-11-20 19:49 Gautier direct_replies_not_read
  0 siblings, 0 replies; 4+ messages in thread
From: Gautier direct_replies_not_read @ 2002-11-20 19:49 UTC (permalink / raw)


>is there a pre-defined function in ada that converts hex to decimal,
>or do I have to write from scratch? thanks

You can use the 'Image and 'Value attributes. E.g.:

with Ada.Text_IO;
procedure Test_hex_to_dec is
begin
  Ada.Text_IO.Put( Integer'Image( Integer'Value("16#1A2B3C#") ) );
end;
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, address on the Web site!


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus




^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <mailman.1037815682.9555.comp.lang.ada@ada.eu.org>]
* pre-defined function convert hex to decimal?
@ 2002-11-20 17:12 Sarah Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Sarah Thomas @ 2002-11-20 17:12 UTC (permalink / raw)


is there a pre-defined function in ada that converts hex to decimal,
or do I have to write from scratch? thanks



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-21 13:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20 19:49 pre-defined function convert hex to decimal? Gautier direct_replies_not_read
     [not found] <mailman.1037815682.9555.comp.lang.ada@ada.eu.org>
2002-11-20 18:44 ` Robert A Duff
2002-11-21 13:39   ` Marin David Condic
  -- strict thread matches above, loose matches on Subject: below --
2002-11-20 17:12 Sarah Thomas

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