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.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b22211eabfb58b72,start X-Google-Attributes: gid103376,public From: Cheryl Earnest Subject: Help! Date: 1996/10/01 Message-ID: <3250AE4D.100191BB@labyrinth.cftnet.com>#1/1 X-Deja-AN: 186398150 organization: CFTnet content-type: multipart/mixed; boundary="------------3D0BC6664236DCC73767A100" mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i486) Date: 1996-10-01T00:00:00+00:00 List-Id: This is a multi-part message in MIME format. --------------3D0BC6664236DCC73767A100 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Can someone please help me with the attached program. I think that my problem has to do with the gross_pay variable. I just can't see what the problem is. The Compilation error is "invalid paramater in call" Thanks, Cherie --------------3D0BC6664236DCC73767A100 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cherieprog2.adb" --Cheryl Earnest (cherie) 593-48-8506 --Intro to Computer Science Lab --Assignment 2 Due: September ? with Text_Io; use Text_Io; procedure cherieprog2 is package flt_io is new Float_Io(Float); package int_io is new Integer_Io(Integer); package boolean_io is new enumeration_io(Boolean); name: String(1..30); length: Integer; hours_worked: Float; hourly_rate: Float; dependents: Float; union_member: Character; union_dues: Float; federal_tax: Float; social_security: Float; gross_pay: Float; procedure gross(hours_worked, hourly_rate: in Float; gross_pay: out Float) is overtime: Float; regular: constant := 40.0; begin if hours_worked > regular then overtime := hours_worked - regular; gross_pay := ((hours_worked * hourly_rate) + (overtime * 1.5 * hourly_rate)); elsif hours_worked <= regular then overtime := 0.0; gross_pay := (hours_worked * hourly_rate); end if; end gross; function tax(gross_pay, dependents: Float) return Float is begin if gross_pay > 150.0 then return(gross_pay - (13.0 * dependents)); elsif gross_pay <= 150.0 then return(0.0); end if; return(0.0); end tax; function ssecurity(gross_pay: Float) return Float is begin if gross_pay > 150.0 then return(0.052 * gross_pay); elsif gross_pay <= 150.0 then return(0.0); end if; return(0.0); end ssecurity; function union(gross_pay: Float) return float is begin return(0.0675 * gross_pay); end union; procedure net(gross_pay, federal_tax, social_security, union_dues: Float) is net_pay: Float; begin put("Net pay = $"); net_pay := gross_pay - federal_tax - social_security - union_dues; put_line(net_pay, AFT=>2,EXP=>0); end net; begin put("Enter employee name: "); get_line(name, length); new_line; put("Enter hours worked: "); get(hours_worked); new_line; put("Enter hourly rate: "); get(hourly_rate); new_line; put("Enter number of dependents: "); get(dependents); new_line; put("Is the employee a Union member? (Y/N): "); get(union_member); gross_pay := hours_worked * hourly_rate; new_line; new_line; put("************************************************"); put("Payroll status for "); put(name(1..length)); new_line; gross(hours_worked, hourly_rate, gross_pay); put("Gross pay = $"); put(gross_pay,AFT=>2,EXP=>0); put("Federal tax = $"); federal_tax := tax(gross_pay, dependents); put(federal_tax,AFT=>2,EXP=>0); new_line; put("Social Security = $"); social_security := ssecurity(gross_pay); put(social_security,AFT=>2,EXP=>0); new_line; if union_member = 'Y' then put("Union dues = $"); union_dues := union(gross_pay); put(union_dues, AFT=>2,EXP=>0); new_line; elsif union_member = 'N' then put("No Union dues"); new_line; end if; net(gross_pay, federal_tax, social_security, union_dues); new_line; new_line; put("************************************************"); end cherieprog2; --------------3D0BC6664236DCC73767A100--