* translate character 2 ascii
@ 2000-05-11 0:00 davdenic
2000-05-11 0:00 ` Ted Dennison
0 siblings, 1 reply; 9+ messages in thread
From: davdenic @ 2000-05-11 0:00 UTC (permalink / raw)
Hi, what is the function that translate character in ascii or integer ?
thanks
David.
--
::::::::::::::::::::::::::::::
www.davdenic.com
::::::::::::::::::::::::::::::
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: translate character 2 ascii
2000-05-11 0:00 translate character 2 ascii davdenic
@ 2000-05-11 0:00 ` Ted Dennison
2000-05-11 0:00 ` Ted Dennison
0 siblings, 1 reply; 9+ messages in thread
From: Ted Dennison @ 2000-05-11 0:00 UTC (permalink / raw)
In article <VPAS4.793$F46.8196@news.infostrada.it>,
"davdenic" <davidNOspam@davdenic.com> wrote:
> Hi, what is the function that translate character in ascii or integer
Check out Appendix K of the Ada LRM (available online at
http://www.adapower.com, if you don't have your own).
--
T.E.D.
http://www.telepath.com/~dennison/Ted/TED.html
Sent via Deja.com http://www.deja.com/
Before you buy.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: translate character 2 ascii
2000-05-11 0:00 ` Ted Dennison
@ 2000-05-11 0:00 ` Ted Dennison
2000-05-11 0:00 ` davdenic
0 siblings, 1 reply; 9+ messages in thread
From: Ted Dennison @ 2000-05-11 0:00 UTC (permalink / raw)
In article <8fepcv$dbp$1@nnrp1.deja.com>,
Ted Dennison <dennison@telepath.com> wrote:
> In article <VPAS4.793$F46.8196@news.infostrada.it>,
> "davdenic" <davidNOspam@davdenic.com> wrote:
> > Hi, what is the function that translate character in ascii or
integer
>
> Check out Appendix K of the Ada LRM (available online at
^^^^^^^^
Urgh. That's *Annex* K. Sorry.
--
T.E.D.
http://www.telepath.com/~dennison/Ted/TED.html
Sent via Deja.com http://www.deja.com/
Before you buy.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: translate character 2 ascii
2000-05-11 0:00 ` Ted Dennison
@ 2000-05-11 0:00 ` davdenic
2000-05-11 0:00 ` DuckE
2000-05-12 0:00 ` tmoran
0 siblings, 2 replies; 9+ messages in thread
From: davdenic @ 2000-05-11 0:00 UTC (permalink / raw)
i can't find it, why ? translate real or other into integer is simple using
x:= integer(y), why not for character to ascii or character to integer ?
for example in Pascal there is the functin Ord to convert character to ascii
x:= ord(y);
thanks
David.
--
::::::::::::::::::::::::::::::
www.davdenic.com
::::::::::::::::::::::::::::::
"Ted Dennison" <dennison@telepath.com> ha scritto nel messaggio
news:8fepsc$e04$1@nnrp1.deja.com...
> In article <8fepcv$dbp$1@nnrp1.deja.com>,
> Ted Dennison <dennison@telepath.com> wrote:
> > In article <VPAS4.793$F46.8196@news.infostrada.it>,
> > "davdenic" <davidNOspam@davdenic.com> wrote:
> > > Hi, what is the function that translate character in ascii or
> integer
> >
> > Check out Appendix K of the Ada LRM (available online at
> ^^^^^^^^
>
> Urgh. That's *Annex* K. Sorry.
>
> --
> T.E.D.
>
> http://www.telepath.com/~dennison/Ted/TED.html
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: translate character 2 ascii
2000-05-11 0:00 ` davdenic
@ 2000-05-11 0:00 ` DuckE
2000-05-12 0:00 ` tmoran
1 sibling, 0 replies; 9+ messages in thread
From: DuckE @ 2000-05-11 0:00 UTC (permalink / raw)
"davdenic" <davidNOspam@davdenic.com> wrote in message
news:U5GS4.3578$F46.41867@news.infostrada.it...
> i can't find it, why ? translate real or other into integer is simple
using
> x:= integer(y), why not for character to ascii or character to integer ?
>
> for example in Pascal there is the functin Ord to convert character to
ascii
> x:= ord(y);
>
The corresponding operation in Ada is:
x := Character'Pos( y );
SteveD
> thanks
>
> David.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: translate character 2 ascii
2000-05-11 0:00 ` davdenic
2000-05-11 0:00 ` DuckE
@ 2000-05-12 0:00 ` tmoran
2000-05-12 0:00 ` Ted Dennison
1 sibling, 1 reply; 9+ messages in thread
From: tmoran @ 2000-05-12 0:00 UTC (permalink / raw)
What's the difference between a character 'x' and an ascii 'x'?
If you are talking about position in the list of characters,
n : integer := character'pos('x'); -- set n to 120
c : character := character'val(121); -- set c to 'y'
It's in Appendix K, though I grant it doesn't exactly jump out at you.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: translate character 2 ascii
2000-05-12 0:00 ` tmoran
@ 2000-05-12 0:00 ` Ted Dennison
2000-05-12 0:00 ` Ehud Lamm
0 siblings, 1 reply; 9+ messages in thread
From: Ted Dennison @ 2000-05-12 0:00 UTC (permalink / raw)
In article <X9OS4.526$4L1.385603@news.pacbell.net>,
tmoran@bix.com wrote:
> It's in Appendix K, though I grant it doesn't exactly jump out at you.
True. The reason I pointed David to Annex K rather than just tell him,
is so that he'd have to read through the Annex. There's lots of other
very important stuff in there (eg: 'val, 'image) that anyone programming
Ada at *any* level needs to know about.
--
T.E.D.
http://www.telepath.com/~dennison/Ted/TED.html
Sent via Deja.com http://www.deja.com/
Before you buy.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: translate character 2 ascii
2000-05-12 0:00 ` Ted Dennison
@ 2000-05-12 0:00 ` Ehud Lamm
2000-05-13 0:00 ` davdenic
0 siblings, 1 reply; 9+ messages in thread
From: Ehud Lamm @ 2000-05-12 0:00 UTC (permalink / raw)
On Fri, 12 May 2000, Ted Dennison wrote:
|True. The reason I pointed David to Annex K rather than just tell him,
|is so that he'd have to read through the Annex. There's lots of other
|very important stuff in there (eg: 'val, 'image) that anyone programming
|Ada at *any* level needs to know about.
|
True. This is a good approachfor any kind of real learning (don't give
fish, give fishing rods...). The case for Annex K is even stronger.
I routinely direct my students to Annex K (and A...)
Ehud Lamm mslamm@mscc.huji.ac.il
http://purl.oclc.org/NET/ehudlamm <== My home on the web
Check it out and subscribe to the E-List- for interesting essays and more!
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: translate character 2 ascii
2000-05-12 0:00 ` Ehud Lamm
@ 2000-05-13 0:00 ` davdenic
0 siblings, 0 replies; 9+ messages in thread
From: davdenic @ 2000-05-13 0:00 UTC (permalink / raw)
Thanks.
--
::::::::::::::::::::::::::::::
www.davdenic.com
::::::::::::::::::::::::::::::
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2000-05-13 0:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-11 0:00 translate character 2 ascii davdenic
2000-05-11 0:00 ` Ted Dennison
2000-05-11 0:00 ` Ted Dennison
2000-05-11 0:00 ` davdenic
2000-05-11 0:00 ` DuckE
2000-05-12 0:00 ` tmoran
2000-05-12 0:00 ` Ted Dennison
2000-05-12 0:00 ` Ehud Lamm
2000-05-13 0:00 ` davdenic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox