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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b971479ef2fe811a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-21 12:26:35 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!snoopy.risq.qc.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "CheGueVerra" Newsgroups: comp.lang.ada Subject: Getting valid Integer values !! X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Tue, 21 Oct 2003 15:11:34 -0400 NNTP-Posting-Host: 67.71.117.216 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1066763493 67.71.117.216 (Tue, 21 Oct 2003 15:11:33 EDT) NNTP-Posting-Date: Tue, 21 Oct 2003 15:11:33 EDT Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:1314 Date: 2003-10-21T15:11:34-04:00 List-Id: Hi guys it's me again, Well after so much time playing with Ada I think I'm starting to get the beat of it a special thanks to all those who have helped and will help down the road... Now, after testing a bit, this is the procedure I want to use to make sure that the Integer values entered are valid and are in the range that I expect them to be, it seems to be working fine, I'll test some more after the post, but if you see some things that I Might have not thought of please tell me so [code snippet] package Entiers is new Text_io.Integer_io (Num => Integer) IntData : integer range 1000000..9999999; ValidKey : Boolean := false; begin put_line("Test Valid Key"); while not ValidKey loop begin Put_line(" Enter Key :"); Entiers.Get(IntData); ValidKey := True; exception When Data_error | Constraint_error => Put_line(" Error reading value, Integer expected of range ..."); Skip_line; end; end loop; Put_Line("Valid data entered"); ... Keep in mind that I can't use an exit in a loop so I used the boolean value, it seems to work but ada has surprised me before .... TIA CheGueVerra