comp.lang.ada
 help / color / mirror / Atom feed
From: lomoscompany@gmail.com
Subject: Convert a Wide_String (or a Wide_Character) to an Integer.
Date: Tue, 10 Feb 2015 13:16:52 -0800 (PST)
Date: 2015-02-10T13:16:52-08:00	[thread overview]
Message-ID: <19fa66d7-91ac-4196-9c8f-c633950b9e39@googlegroups.com> (raw)

Why does it have to be so damn complicated?

I have the following function:

function Get_Lexical_Category (Input : in Wide_String)
    return Lexical_Category_Id is
    -- Retrieves the number representing the lexical category
    -- of the word.

    Number_Index : Integer
                 := Lexical_Category_Position;
    Lexical_Category : Wide_Character
                     := Input(Input'First - 1 + Number_Index);
begin
    -- NEED TO RETURN AN INTEGER CREATED FROM A SINGLE CHARACTER IN A WIDE 
    -- STRING HERE
end Get_Lexical_Category;

How does one convert a Wide_String into a normal String? Or, in my case, a Wide_Character to a Character.

Or is there any version of "Integer'Value" that takes Wide_Strings?


Thanks a lot for any help, this is really frustrating.


             reply	other threads:[~2015-02-10 21:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 21:16 lomoscompany [this message]
2015-02-10 21:38 ` Convert a Wide_String (or a Wide_Character) to an Integer Jeffrey Carter
2015-02-10 21:51 ` Randy Brukardt
2015-02-10 22:38 ` lomoscompany
2015-02-11  1:18   ` David Botton
2015-02-11 21:59     ` lomoscompany
2015-02-11 22:05       ` David Botton
2015-02-12 20:09         ` Randy Brukardt
2015-02-13 22:11 ` lomoscompany
replies disabled

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