comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: How to get an ASCII code ?
Date: Tue, 30 Oct 2001 09:22:13 -0500
Date: 2001-10-30T09:22:13-05:00	[thread overview]
Message-ID: <tttdmp64dqv206@corp.supernews.com> (raw)
In-Reply-To: 20011030-135944-285742@foorum.com


"Apokrif" <apokrif1@yahoo.com> wrote in message
news:20011030-135944-285742@foorum.com...
>
> How can I get the ASCII code for a given character in Ada? Is there a
function
> similar to Pascal 'ord' ?

declare
   C : constant Character := 'a';
   I : constant Natural := Character'Pos (C);
begin

To back the other way, use Character'Val.











  reply	other threads:[~2001-10-30 14:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-30 12:59 How to get an ASCII code ? Apokrif
2001-10-30 14:22 ` Matthew Heaney [this message]
2001-10-30 15:16   ` Marin David Condic
2001-10-30 23:19     ` Nick Roberts
2001-10-31 14:48       ` Marin David Condic
replies disabled

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