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-Thread: 103376,e3ba37c5a979fdcb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail From: "jimmaureenrogers@worldnet.att.net" Newsgroups: comp.lang.ada Subject: Re: invalid parameter list Date: 17 Feb 2006 22:02:40 -0800 Organization: http://groups.google.com Message-ID: <1140240895.727391.64810@g14g2000cwa.googlegroups.com> References: <1140218028.145204.141420@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: 69.170.89.0 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1140242565 10852 127.0.0.1 (18 Feb 2006 06:02:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 18 Feb 2006 06:02:45 +0000 (UTC) In-Reply-To: <1140218028.145204.141420@z14g2000cwz.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=69.170.89.0; posting-account=SqOfxAwAAAAkL81YAPGH1JdBwpUXw9ZG Xref: g2news1.google.com comp.lang.ada:2947 Date: 2006-02-17T22:02:40-08:00 List-Id: isaac2004 wrote: > hello > i am getting an error about an invalid parameter in this code > ... > > procedure Sociable_Chain ( > Start, > Max : Natural) is > A : array (1 .. 30) of Positive; > I : Positive; > > begin > A(1) :=Start; -- makes first number of array the prompt number > A(2) := Sum_Of_Divisors (A(1)); -- 2nd number in array is sum of > divisors of prompt > while I < Max and A (1) /= A(I) loop -- loop till length is > reached and till A(I) = A(1) > I:= I + 1; > A(I) := Sum_Of_Divisors (A(I - 1)); > > > end loop; > > end Sociable_Chain; > > begin > > > Put(Item => " Please enter your starting integer. "); > Get(Item => Start); > New_Line; > Put(Item => " Please enter your ending integer. "); > Get(Item => Stop); > New_Line; > Put(Item => " Please choose the length of your chain. "); > Get(Item => Max); > > > > -- for N in Minnumber..Maxnumber loop > -- Sociable_Chain(Minnumber, Length); > > -- end loop; > > -- Put (Item => Sum_Of_Divisors (Start), Width => 0 ) ; > > ---------------------------------------------------error here > Put (Item => Sociable_Chain ( Start, Max ), Width => 0 ) ; > > ----------------------------------------------------------------------------------------- > > > end Assignment3 ; > > am i specifying the wrong values for my procedure The Put procedure you are calling expects the value associated with Item to be an Integer. You call procedure Sociable_Chain. Procedures do not return values. The procedure Put has no value to associate with its Item parameter. Have you considered converting Sociable_Chain to a function returning a Natural? Jim Rogers