comp.lang.ada
 help / color / mirror / Atom feed
* Re: convert character to ascii
  2000-05-11  0:00 convert character to ascii john doe
  2000-05-11  0:00 ` Preben Randhol
@ 2000-05-11  0:00 ` Frank J. Lhota
  1 sibling, 0 replies; 4+ messages in thread
From: Frank J. Lhota @ 2000-05-11  0:00 UTC (permalink / raw)



"john doe" <johndoe@microsoft.com> wrote in message
news:8fe2jd$enb$1@le.cs.unibo.it...
> Hi, what is the function that translate character to ascii ?

Please clarify what you mean by "translate character to ascii". The Ada
character type uses the ASCII coding, so it is not clear what translation is
needed.

> or character to integer ?

The Character'Pos attribute will do the trick, returning integer values in
the range 0 .. 16#FF#.






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

* convert character to ascii
@ 2000-05-11  0:00 john doe
  2000-05-11  0:00 ` Preben Randhol
  2000-05-11  0:00 ` Frank J. Lhota
  0 siblings, 2 replies; 4+ messages in thread
From: john doe @ 2000-05-11  0:00 UTC (permalink / raw)


Hi, what is the function that translate character to ascii ? or character to
integer ?

thanks.
________
John Doe.






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

* Re: convert character to ascii
  2000-05-11  0:00 convert character to ascii john doe
@ 2000-05-11  0:00 ` Preben Randhol
  2000-05-13  0:00   ` davdenic
  2000-05-11  0:00 ` Frank J. Lhota
  1 sibling, 1 reply; 4+ messages in thread
From: Preben Randhol @ 2000-05-11  0:00 UTC (permalink / raw)


On Thu, 11 May 2000 12:41:04 +0200, john doe wrote:
>Hi, what is the function that translate character to ascii ? or character to
>integer ?

Read: http://www.adapower.com/rm95/arm95_49.html#SEC49


   C : Character := "A";
   Result : Integer;

   Result := Character'Pos(C);

-- 
Preben Randhol -- [randhol@pvv.org] -- <http://www.pvv.org/~randhol/>
         "Det eneste trygge stedet i verden er inne i en fortelling."
                                                      -- Athol Fugard




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

* Re: convert character to ascii
  2000-05-11  0:00 ` Preben Randhol
@ 2000-05-13  0:00   ` davdenic
  0 siblings, 0 replies; 4+ messages in thread
From: davdenic @ 2000-05-13  0:00 UTC (permalink / raw)


thanks

--
::::::::::::::::::::::::::::::
www.davdenic.com
::::::::::::::::::::::::::::::







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

end of thread, other threads:[~2000-05-13  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-11  0:00 convert character to ascii john doe
2000-05-11  0:00 ` Preben Randhol
2000-05-13  0:00   ` davdenic
2000-05-11  0:00 ` Frank J. Lhota

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