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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,70463e369385ff2a,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-05 15:19:03 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Beau" Newsgroups: comp.lang.ada Subject: explain error to me Date: Thu, 5 Jul 2001 17:18:40 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:9505 Date: 2001-07-05T17:18:40-05:00 List-Id: I am getting an error can someone help: the spec file as follows: ---------------------------------------------------------------- --This is the Spec file for the package Print_Table. --created by Beau Elliott --------------------------------------------------------------------- PACKAGE Print_Table IS -------------------------------------------------------------------------- --declarations needed in the package SUBTYPE IDnumbers IS Natural RANGE 0..9999; --subtype for ID numbers TYPE HouseHolds IS RECORD --record for each house containing its ID ID : IDnumbers; --number, Annual Income, and the number of Income : Natural; --People living there Members : Positive; END RECORD; SUBTYPE ArrayCounter IS Natural RANGE 1..25; --counter for the number of --houses we are using ArraySize : CONSTANT Positive := 25; TYPE HouseArrays IS ARRAY (ArraySize) OF HouseHolds; ListofHouses : HouseArrays; Poverty : Natural; --variable to tell if the house lives under or above --poverty Pause : Character; --pause between reading of tables ------------------------------------------------------------------------ --procedures needed are: Procedure PrintList(ListofHouses : HouseHolds); --pre: ListofHouses array is passed already defined --post: The ListofHouses is printed on the screen Procedure AboveAverageIncome(ListofHouses : HouseHolds); --pre: ListofHouses array is passed already defined --post: The list of Houses that is above the poverty line is printed --------along with the ID and Income of the house Procedure BelowAverageIncome(ListofHouses : HouseHolds); --pre: ListofHouses array is passed already defined --post: The list of houses that is below poverty rate is printed --------with the House's ID END Print_Table; ---------------------------------------------------------------------------- ------------------------------------------------------------------ the body of the package is as follows: ----------------------------------------------------- WITH Ada.Text_IO; USE Ada.Text_IO; WITH Ada.Integer_Text_IO; USE Ada.Integer_Text_IO; PACKAGE BODY Print_Table IS PROCEDURE PrintList(ListofHouses : HouseArrays) IS BEGIN Put(Item => "Household Income Table. This will tell 25 "); New_Line; Put(Item => "Houses ID number, Annual Income, and how many "); Put(Item => "people live there."); New_Line(Spacing => 3); Put(Item => "Identification Number Annual Income"); Put(Item => " Household Numbers"); New_Line; Put(Item => "__________________________________________________"); New_Line; FOR Counter IN ArrayCounter LOOP Put(Item => ListofHouses(Counter).ID, width => 6); Put(Item => ListofHouses(Counter).Income, Width => 6); Put(Item => ListofHouses(Counter).Members, Width => 6); New_Line; END LOOP; END PrintList; PROCEDURE AboveAverageIncome(ListofHouses : HouseHolds) IS BEGIN Put(Item => "This Table will represent each house that is "); New_Line; Put(Item => "above the poverty line."); New_Line(Spacing => 3); Put(Item => "Identification Number Annual Income"); New_Line; Put(Item => "_______________________________________________"); New_Line; FOR Counter IN ArrayCounter LOOP Poverty := 0; Poverty := 6500 + (750 * (ListofHouses(Counter).Member - 2)); IF ListofHouses(Counter).Income >= Poverty THEN Put(Item => ListofHouses(Counter).ID, Width => 6); Put(Item => ListofHouses(Counter).Income, Width => 6); END IF; New_Line; END LOOP; END AboveAverageIncome; PROCEDURE BelowAverageIncome(ListofHouses : HouseHolds) IS BEGIN Put(Item => "This table will represent each house that is below"); New_Line; Put(Item => "the poverty line."); New_Line(Spacing => 3); Put(Item => "Identification Number"); Put(ITem => "________________________"); FOR Counter IN ArrayCounter LOOP Poverty := 0; Poverty := 6500 + (750 * (ListofHouses(Counter).Member - 2)); IF ListofHouses(Counter).Income < Poverty THEN Put(Item => ListofHouses(Counter).ID, Width => 6); END IF; New_Line; END LOOP; END BelowAverageIncome; END Print_Table; -- ~Beau~ beau@hiwaay.net