pascal program assignment help

On Sun, 18 Oct 1998, John Bell wrote:

JB> hello you lovely clever cobol and pascal programmers,

How did you know I was a clever COBOL/Pascal programmer ;)

JB> can you help me with my assignment. i've attached problem and my
JB> solution so far. unfortunately with all the changing and workings,
JB> the pool as become more muddier than clearer.

I. Posting binaries to a text newsgroup is considered poor etiquette.
    A. Posting it in a Word 97 format is even worse because a lot of
       people either don't use MS Word or have an older version unable
       to read your file format.
    B. Posting it in text would far more preferable (and easier).
    C. Just give a synopsis of what you need help with - not the
       entire project.

Problems I see so far: 1) using unassigned variables (i.e. A and B);
2) Not enough storage space (i.e. EmployeeName has enough room to
store 1 character); 3) Assigning invalid values to variables (i.e.
A and B can only be set to true|false not 10 or 14); 4) Your
if/then/else logic is going to deeply nested. Consider rethinking
your steps and possibly using "procedures" if you're allowed to

I've done you the favor of indenting and inserting lines to make it
a bit more readable. What you have so far looks like a decent start
but also points out you're not too sure where you're going. Have you
sat down with pencil & paper and thoroughly mapped out what you want
to do?

Program ShiftBonus (Input, Output) ;
  author john bell
  date   10/10/98

(* weekly employee shift bonus*)
  ordhours = 6 ;

  HoursPerShift, BonusHourRate, ClockNumber, ShiftsPerWeek,
  AShift, BShift, Sum, WeekHoursAttend : integer;

  EmployeeName : char ;

  A, B, ErrorFlag : boolean;

  WeekAttendBonus, WeekAddHoursBonus : real;

   writeln ('shift bonus for employees') ;
   writeln ('date') ;
   writeln ('week number') ;
   write   ('input employee clock number, 9999 to be used as terminator') ;
   readln  (clocknumber) ;

   while clocknumber <> 9999 do
         errorflag := false ;

         if (clocknumber <0) or (clocknumber >9999) then
               writeln ('error in clock number') ;
               errorflag := true ;
               writeln ('input employee name      ') ;
               readln  (employeename) ;
               writeln ('input shift worked, a or b  ') ;
               readln  (ashift, bshift) ;

               if (a) then
               else if (b) then
                  b:=12 ;

               while shift = a,b do
                     errorflag := false ;

                     if (shift <> a) or (shift <> b) then