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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec207d04b64c2261,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-05 09:57:53 PST From: Stewart Newsgroups: comp.lang.ada Subject: Convert ASCII numerals to Integer numbers Date: Sun, 05 Aug 2001 17:58:33 +0100 Message-ID: X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: host62-6-64-117.dialup.lineone.co.uk X-Trace: 5 Aug 2001 17:57:51 +0100, host62-6-64-117.dialup.lineone.co.uk Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!colt.net!dispose.news.demon.net!demon!mk-nntp-1.news.uk.worldonline.com!host62-6-64-117.dialup.lineone.co.uk Xref: archiver1.google.com comp.lang.ada:11317 Date: 2001-08-05T17:58:33+01:00 List-Id: HI, Gnat 3.13 on win98 and linux. I am creating a menu and I am grabbing the terminal input using get_line, but on this particular command the last 1 .. 3 characters can be numerals in the range of 1 .. 999. I am considering character'pos but how can I manipulate to an integer? Extracted from menu: The commands work as I require them including error handling. If I dont use get_line I can get the integers but I cant resolve the error handling. elsif Input(1..4) = Link and 19 < Max_Size and Max_Size < 23 then Nodea := Input(6..11); Nodeb := Input(13..18); Edget := Input(20..22); Put("The command is : "); Put(Input(1..4)); New_Line; Put("Node A is : "); Put(Nodea); New_Line; Put("Node B is : "); Put(Nodeb); New_Line; Put("Cost is : "); Put(Edget); New_Line; Int_Range := Max_Size - 19; Put("Cost range is : "); Put(Int_Range); New_Line; I now want to get the last three characters and convert them to integers