* Re: HELP HELP HELP PLEASE Ordinal Function
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Markus Rogawski
1998-12-14 0:00 ` Matthew Heaney
@ 1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Johnny
3 siblings, 0 replies; 9+ messages in thread
From: Johnny @ 1998-12-14 0:00 UTC (permalink / raw)
On Mon, 14 Dec 1998 04:19:20 GMT, John_Lin@paramount.com (Johnny)
wrote:
>On Mon, 14 Dec 1998 03:55:44 GMT, Matthew Heaney
><matthew_heaney@acm.org> wrote:
>
>>John_Lin@paramount.com (Johnny) writes:
>>
>>> Does anybody know the function to get the ASCII # for symbols in
>>> ADA95? Thnx
>>
>>declare
>> C : Character := ...;
>>begin
>> <ascii#> := Character'Pos (C);
>>end;
>>
>>You can go the other way by using Character'Val (<ascii#>);
Thank You Very Very Much,
Will implement the Character'Pos tonight, Thanks to your help,
Thank goodness for Usenet and nice people
>
>
>Would you happen to know if Character'Val and Character'pos are in the
>Standard IO_Text Package? My book is ADA95 by feldman and Koffman
>2nd edition it does not list these functions in its text_io or
>standard packages.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: HELP HELP HELP PLEASE Ordinal Function
1998-12-14 0:00 ` Johnny
` (2 preceding siblings ...)
1998-12-14 0:00 ` Johnny
@ 1998-12-14 0:00 ` Johnny
3 siblings, 0 replies; 9+ messages in thread
From: Johnny @ 1998-12-14 0:00 UTC (permalink / raw)
On Mon, 14 Dec 1998 04:19:20 GMT, John_Lin@paramount.com (Johnny)
wrote:
>On Mon, 14 Dec 1998 03:55:44 GMT, Matthew Heaney
><matthew_heaney@acm.org> wrote:
>
>>John_Lin@paramount.com (Johnny) writes:
>>
>>> Does anybody know the function to get the ASCII # for symbols in
>>> ADA95? Thnx
>>
>>declare
>> C : Character := ...;
>>begin
>> <ascii#> := Character'Pos (C);
>>end;
>>
>>You can go the other way by using Character'Val (<ascii#>);
>
>
>Would you happen to know if Character'Val and Character'pos are in the
>Standard IO_Text Package? My book is ADA95 by feldman and Koffman
>2nd edition it does not list these functions in its text_io or
>standard packages.
Thank You for your help
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: HELP HELP HELP PLEASE Ordinal Function
1998-12-14 0:00 ` Johnny
@ 1998-12-14 0:00 ` Markus Rogawski
1998-12-14 0:00 ` Matthew Heaney
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Markus Rogawski @ 1998-12-14 0:00 UTC (permalink / raw)
To: Johnny
Johnny schrieb:
> Would you happen to know if Character'Val and Character'pos are in the
> Standard IO_Text Package? My book is ADA95 by feldman and Koffman
> 2nd edition it does not list these functions in its text_io or
> standard packages.
These are standart attributes, not Text_Io functions.
See Ada Reference Manual 4.1.4 and 3.5.5
Greetings
Markus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: HELP HELP HELP PLEASE Ordinal Function
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Markus Rogawski
@ 1998-12-14 0:00 ` Matthew Heaney
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Johnny
3 siblings, 0 replies; 9+ messages in thread
From: Matthew Heaney @ 1998-12-14 0:00 UTC (permalink / raw)
John_Lin@paramount.com (Johnny) writes:
> Would you happen to know if Character'Val and Character'pos are in the
> Standard IO_Text Package? My book is ADA95 by feldman and Koffman
> 2nd edition it does not list these functions in its text_io or
> standard packages.
You need an Ada RM. Go to adahome page and follow the links to an
online reference manual.
<http://www.adahome.com/>
No, Character'Pos and 'Val are not "in" Text_IO. You don't seem to
understand the concept of an attribute. Read about type attributes in
the Feldman book, or another. (There are tutorials at the adahome
page.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: HELP HELP HELP PLEASE Ordinal Function
1998-12-14 0:00 HELP HELP HELP PLEASE Ordinal Function Johnny
1998-12-14 0:00 ` Matthew Heaney
@ 1998-12-14 0:00 ` Ehud Lamm
1 sibling, 0 replies; 9+ messages in thread
From: Ehud Lamm @ 1998-12-14 0:00 UTC (permalink / raw)
On Mon, 14 Dec 1998, Johnny wrote:
> Does anybody know the function to get the ASCII # for symbols in
> ADA95? Thnx
>
If this is not in the FAQ, it should be there.
Remember that in Ada the character type is simply an enumeration type,
ordered by ASCII values (what happens on EBCDIC, I don't know). So you can
use the attributes enumeration types support. Like character'pos('A')
Enjoy
Ehud Lamm mslamm@mscc.huji.ac.il
http://www2.cybercities.com/e/ehud/ada Ada & SE resources
^ permalink raw reply [flat|nested] 9+ messages in thread
* HELP HELP HELP PLEASE Ordinal Function
@ 1998-12-14 0:00 Johnny
1998-12-14 0:00 ` Matthew Heaney
1998-12-14 0:00 ` Ehud Lamm
0 siblings, 2 replies; 9+ messages in thread
From: Johnny @ 1998-12-14 0:00 UTC (permalink / raw)
Does anybody know the function to get the ASCII # for symbols in
ADA95? Thnx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: HELP HELP HELP PLEASE Ordinal Function
1998-12-14 0:00 HELP HELP HELP PLEASE Ordinal Function Johnny
@ 1998-12-14 0:00 ` Matthew Heaney
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Ehud Lamm
1 sibling, 2 replies; 9+ messages in thread
From: Matthew Heaney @ 1998-12-14 0:00 UTC (permalink / raw)
John_Lin@paramount.com (Johnny) writes:
> Does anybody know the function to get the ASCII # for symbols in
> ADA95? Thnx
declare
C : Character := ...;
begin
<ascii#> := Character'Pos (C);
end;
You can go the other way by using Character'Val (<ascii#>);
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: HELP HELP HELP PLEASE Ordinal Function
1998-12-14 0:00 ` Matthew Heaney
@ 1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Johnny
1 sibling, 0 replies; 9+ messages in thread
From: Johnny @ 1998-12-14 0:00 UTC (permalink / raw)
On Mon, 14 Dec 1998 03:55:44 GMT, Matthew Heaney
<matthew_heaney@acm.org> wrote:
>John_Lin@paramount.com (Johnny) writes:
>
>> Does anybody know the function to get the ASCII # for symbols in
>> ADA95? Thnx
>
>declare
> C : Character := ...;
>begin
> <ascii#> := Character'Pos (C);
>end;
>
>You can go the other way by using Character'Val (<ascii#>);
Thank You Very Very Much,
Will implement the Character'Pos tonight, Thanks to your help,
Thank goodness for Usenet and nice people
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: HELP HELP HELP PLEASE Ordinal Function
1998-12-14 0:00 ` Matthew Heaney
1998-12-14 0:00 ` Johnny
@ 1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Markus Rogawski
` (3 more replies)
1 sibling, 4 replies; 9+ messages in thread
From: Johnny @ 1998-12-14 0:00 UTC (permalink / raw)
On Mon, 14 Dec 1998 03:55:44 GMT, Matthew Heaney
<matthew_heaney@acm.org> wrote:
>John_Lin@paramount.com (Johnny) writes:
>
>> Does anybody know the function to get the ASCII # for symbols in
>> ADA95? Thnx
>
>declare
> C : Character := ...;
>begin
> <ascii#> := Character'Pos (C);
>end;
>
>You can go the other way by using Character'Val (<ascii#>);
Would you happen to know if Character'Val and Character'pos are in the
Standard IO_Text Package? My book is ADA95 by feldman and Koffman
2nd edition it does not list these functions in its text_io or
standard packages.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~1998-12-14 0:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-14 0:00 HELP HELP HELP PLEASE Ordinal Function Johnny
1998-12-14 0:00 ` Matthew Heaney
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Markus Rogawski
1998-12-14 0:00 ` Matthew Heaney
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Johnny
1998-12-14 0:00 ` Ehud Lamm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox