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,98e6b29260f70dc7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-08-15 21:11:30 PST Path: supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!newsfeed.iinet.net.au!news.iinet.net.au!not-for-mail From: "Damon Carter" Newsgroups: comp.lang.ada References: <39991c02$0$17111@echo-01.iinet.net.au> <399920FE.556AD44F@Physik.Uni-Magdeburg.de> <39998CC2.A07B01F1@NULL.lmco.com> Subject: mmmmmmmmmmmm Date: Wed, 16 Aug 2000 12:19:10 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: <399a1b30$0$1055@echo-01.iinet.net.au> NNTP-Posting-Host: 203.59.79.222 X-Trace: news.iinet.net.au 966400816 1055 203.59.79.222 Xref: supernews.google.com comp.lang.ada:152 Date: 2000-08-16T12:19:10-07:00 List-Id: The task i have is to write Get_Valid_Integer as a procedure embedded in a main program that prompts the user to enter an integer in the range between 1 and 40 and only exit when a correct value has been entered. It doesnt have to output to the user what the number they entered was it just has to check that its in the range. They have told me that i have to use this specification- procedure Get_Valid_Integer (The_Integer : out Integer; Prompt_Text : String := "any integer The_Integer"; Lower : Integer := Integer'First; Upper : Integer := Integer'Last); I have also been told that "The limits for the integer should not be hard -wired as literal values into the subprogram code. These limits should be communicated to the subprogram as actual parameters, received by formal parameters, say Lower and Upper. These formal parameter values can then be used in the subprogram to check that a value input by the user is in the required range. They can also be outpt as part of athe prompting message, for example, using the Image attribute:" without using formal parameters or the procedure above i have been able to write a program that meets all the requirements. But im meant to use formal parameters and the Get_Valid_Integer procedure above. I dont know how to define Lower and Upper to make the range between 1 and 40.