From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.70.46.233 with SMTP id y9mr22206653pdm.9.1423607938473; Tue, 10 Feb 2015 14:38:58 -0800 (PST) X-Received: by 10.140.101.79 with SMTP id t73mr209390qge.8.1423607938212; Tue, 10 Feb 2015 14:38:58 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!hl2no10091550igb.0!news-out.google.com!n6ni0qar.0!nntp.google.com!v8no8238965qal.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 10 Feb 2015 14:38:58 -0800 (PST) In-Reply-To: <19fa66d7-91ac-4196-9c8f-c633950b9e39@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=89.176.19.227; posting-account=yOKAawoAAACaU8UwGEAM5YU6h-l0hKEQ NNTP-Posting-Host: 89.176.19.227 References: <19fa66d7-91ac-4196-9c8f-c633950b9e39@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Convert a Wide_String (or a Wide_Character) to an Integer. From: lomoscompany@gmail.com Injection-Date: Tue, 10 Feb 2015 22:38:58 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:24938 Date: 2015-02-10T14:38:58-08:00 List-Id: 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.