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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,29f311e5e4153888 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g49g2000cwa.googlegroups.com!not-for-mail From: "ramesh" Newsgroups: comp.lang.ada Subject: Re: need help with errors im getting Date: 26 Jun 2005 01:12:22 -0700 Organization: http://groups.google.com Message-ID: <1119773542.691728.137240@g49g2000cwa.googlegroups.com> References: <1119650372.546285.220190@z14g2000cwz.googlegroups.com> <1119724710.107186.139010@g47g2000cwa.googlegroups.com> <6g5sb1ptj1611oq6vbiirutlj9gv5lv39m@4ax.com> NNTP-Posting-Host: 158.135.0.42 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1119773547 18404 127.0.0.1 (26 Jun 2005 08:12:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 26 Jun 2005 08:12:27 +0000 (UTC) In-Reply-To: <6g5sb1ptj1611oq6vbiirutlj9gv5lv39m@4ax.com> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g49g2000cwa.googlegroups.com; posting-host=158.135.0.42; posting-account=jaODIw0AAAAqz8a5fLvIQzGSVAOK2M7x Xref: g2news1.google.com comp.lang.ada:11661 Date: 2005-06-26T01:12:22-07:00 List-Id: Thanks Dennis for you time and valuable sujjestions. I have changed my code now but having error in one of the procedures to get Employee Hired date. ------------------------------------------------------------- Testing.Ads ------------------------------------------------------------- with Date_pack; use Date_pack; package testing is type sex1 is (male, female); subtype String20 is String(1..20); type person is abstract tagged limited private; procedure PersonDetails(p: in out Person ; name1: String20; dob: Date; s: sex1); procedure printName(person_name: Person); type Employee is abstract tagged limited private; procedure EmployeeDetails(e: in out Employee; name2: String20; dob:Date; s: sex1); procedure printDateHired(dh: Employee); private Year, Day : INTEGER; MOnth : Month_name; type person is abstract tagged limited record Name : String20; BirthDate : Date := (January,1,1970); Sex : Sex1; end record; --------------------------------------------------------------- Testing.Adb -------------------------------------------------------------- with Ada.Text_IO; use Ada.Text_IO; with Date_pack; use Date_pack; --with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; --with testing; use testing; package body testing is procedure PersonDetails( p: in out Person;name1: String20; dob: Date; s: sex1) is begin p.name := name1; p.sex := s; p.BirthDate:= dob; end; procedure printName(person_name: Person) is begin for i in 1..String20'Last loop put(Person_name.name(i)); end loop; end; procedure EmployeeDetails(e: in out Employee; name2: String20; dob:Date; s: sex1) is begin e.name := name2; e.sex := s; e.BirthDate := dob; end; procedure printDateHired(dh : Employee) is begin put(dh.DateHired);----- Getting error here"invalid parameter list in call" --put(dh); --Put(Month,10);Put("/"); Put(Day,3);Put("/"); Put(Year,5); end; end testing; ------------------------------------------------------------ Error: "Invalid Parameter list in call" --marked as seen above for line -------------------------------------------------------------------- If you wanna look at Date_pack Date_pack.Ads --------------------------------------------- package Date_pack is type Month_name is (January, February, March, April, May, June, July, August, September, October, November, December); --subtype month_name is integer range 1..12;--to change it into Jan,feb,mar,... refer page 51 of AdaTagged1.doc subtype day_range is integer range 1..31; subtype year_range is integer range 1800..2050; type Date is record month: month_name; day: day_range;--Integer range 1..31; year: year_range;--Integer range 1800..2050; end record; procedure CreateADate; procedure CreateADate(d: in out Date; mm : month_name; dd : day_range; yy : year_range); procedure SetDate(d: in out Date; mm : month_name; dd : day_range; yy : year_range); Procedure GetDate(d: in out Date); procedure GetMonth(d: in out Date); procedure GetDay(d: in out Date); procedure GetYear(d: in out Date); end Date_pack; --------------------------------------------------------------- Im still working on Student package as i wanted to do using tasks, Please help with it. --------------------------------------------------------