comp.lang.ada
 help / color / mirror / Atom feed
From: lomoscompany@gmail.com
Subject: Re: Convert a Wide_String (or a Wide_Character) to an Integer.
Date: Tue, 10 Feb 2015 14:38:58 -0800 (PST)
Date: 2015-02-10T14:38:58-08:00	[thread overview]
Message-ID: <aa67340d-3f62-4821-8f6f-c8aa9ea1ddf8@googlegroups.com> (raw)
In-Reply-To: <19fa66d7-91ac-4196-9c8f-c633950b9e39@googlegroups.com>

On Tuesday, February 10, 2015 at 1:16:54 PM UTC-8, lomosc...@gmail.com wrote:
> 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.

Thanks, both of you. I guess I'll have to study the reference manual.. I have no idea how I'm going to remember all of that, but I'll try.

  parent reply	other threads:[~2015-02-10 22:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 21:16 Convert a Wide_String (or a Wide_Character) to an Integer lomoscompany
2015-02-10 21:38 ` Jeffrey Carter
2015-02-10 21:51 ` Randy Brukardt
2015-02-10 22:38 ` lomoscompany [this message]
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