From: randhol+abuse@pvv.org (Preben Randhol)
Subject: Re: mmmmmmmmmmmm
Date: 2000/08/16
Date: 2000-08-16T08:08:24+00:00 [thread overview]
Message-ID: <slrn8pkiu6.efh.randhol+abuse@kiuk0156.chembio.ntnu.no> (raw)
In-Reply-To: 399a1b30$0$1055@echo-01.iinet.net.au
On Wed, 16 Aug 2000 12:19:10 -0700, Damon Carter wrote:
[..]
>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);
[..]
>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.
Maybe I'm holding the wrong end of the stick here, but as I see it what
they mean is that one should be able to do a call like this:
Get_Valid_Integer (The_Integer => Result,
Promt_Text => String_from_User,
Lower => 1,
Upper => 40); -- [1]
Then you can if one wants to check for a number in a different range,
one can do it by simply changing the call to the function.
If your not sure what to do try looking at:
http://goanna.cs.rmit.edu.au/~dale/ada/aln/4_basic_types.html
[1] You should of course use some variable (or constants) in this call
for the upper and lower bounds, I just typed the values for clarity.
--
Preben Randhol - Ph. D student - http://www.pvv.org/~randhol/
"Violence is the last refuge of the incompetent", Isaac Asimov
next prev parent reply other threads:[~2000-08-16 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-15 0:00 Help!! program doesnt run, has 0 errors Damon Carter
2000-08-15 0:00 ` Gerald Kasner
2000-08-15 0:00 ` M. Kotiaho
2000-08-16 19:19 ` mmmmmmmmmmmm Damon Carter
2000-08-16 0:00 ` Preben Randhol [this message]
2000-08-16 0:00 ` mmmmmmmmmmmm Preben Randhol
2000-08-16 0:00 ` Help!! program doesnt run, has 0 errors Martin Dowie
2000-08-15 0:00 ` Gautier
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox