HELP HELP HELP PLEASE Ordinal Function 
Author Message
 HELP HELP HELP PLEASE Ordinal Function

Does anybody know the function to get the ASCII # for symbols in
ADA95?  Thnx


Fri, 01 Jun 2001 03:00:00 GMT  
 HELP HELP HELP PLEASE Ordinal Function

Quote:

> 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#>);



Fri, 01 Jun 2001 03:00:00 GMT  
 HELP HELP HELP PLEASE Ordinal Function
On Mon, 14 Dec 1998 03:55:44 GMT, Matthew Heaney

Quote:


>> 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


Fri, 01 Jun 2001 03:00:00 GMT  
 HELP HELP HELP PLEASE Ordinal Function
On Mon, 14 Dec 1998 03:55:44 GMT, Matthew Heaney

Quote:


>> 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.  


Fri, 01 Jun 2001 03:00:00 GMT  
 HELP HELP HELP PLEASE Ordinal Function


Quote:
>On Mon, 14 Dec 1998 03:55:44 GMT, Matthew Heaney


>>> 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
Quote:

>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.  



Fri, 01 Jun 2001 03:00:00 GMT  
 HELP HELP HELP PLEASE Ordinal Function


Quote:
>On Mon, 14 Dec 1998 03:55:44 GMT, Matthew Heaney


>>> 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


Fri, 01 Jun 2001 03:00:00 GMT  
 HELP HELP HELP PLEASE Ordinal Function

Johnny schrieb:

Quote:
> 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



Fri, 01 Jun 2001 03:00:00 GMT  
 HELP HELP HELP PLEASE Ordinal Function

Quote:

> 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.)



Fri, 01 Jun 2001 03:00:00 GMT  
 HELP HELP HELP PLEASE Ordinal Function

Quote:

> 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


http://www2.{*filter*}cities.com/e/ehud/ada   Ada & SE resources



Fri, 01 Jun 2001 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Ord Function HELP Please HELP HELP HELP

2. ***HELP***HELP***HELP***Please.

3. Help Help Help Please

4. HELP HELP HELP - round function error

5. help! f90.help help help help

6. help please-----please help about array in DLL

7. ***HELP***HELP***NEED INFORMATION***HELP***HELP

8. HELP HELP HELP HELP

9. HELP HELP HELP HELP

10. help help help help!!!!!!!!!!!

11. (HELP (HELP (HELP (HELP))))

12. HELP: HELP: HELP: HELP: Online-manual on Expect

 

 
Powered by phpBB® Forum Software