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.182.28.71 with SMTP id z7mr23362379obg.36.1423603012836; Tue, 10 Feb 2015 13:16:52 -0800 (PST) X-Received: by 10.140.96.99 with SMTP id j90mr89964qge.20.1423603012811; Tue, 10 Feb 2015 13:16:52 -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!feeder.erje.net!eu.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!hl2no13904216igb.0!news-out.google.com!n6ni2qar.0!nntp.google.com!i13no417662qae.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 10 Feb 2015 13:16:52 -0800 (PST) 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 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <19fa66d7-91ac-4196-9c8f-c633950b9e39@googlegroups.com> Subject: Convert a Wide_String (or a Wide_Character) to an Integer. From: lomoscompany@gmail.com Injection-Date: Tue, 10 Feb 2015 21:16:52 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:24935 Date: 2015-02-10T13:16:52-08:00 List-Id: 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.