
* EDIT.CMD
SET TALK OFF
set colon off
set confirm on
STORE T TO MASK
STORE 1 TO MONE
STORE T TO MNOASK
erase
DO WHILE MASK
   STORE 1 TO X
   STORE 0 TO MTOT
   STORE 0 TO MAVG
   STORE "01" TO MNUM
   @  1, 0 SAY "Edit the record of"
   @  1,20 SAY NAME
   @  2, 0 SAY "--------------------------------------------------"
   @  2,50 SAY "------------------------------"
   @  3, 5 SAY "Assn  1:"
      IF ASN01 = 999.00
         @ 3,14 SAY " --    "
    ELSE
      @  3,14 SAY ASN01
    ENDIF
   @  3,40 SAY "Test   1:"
      IF TEST01=999.00
         @ 3,50 SAY  " --    "
      ELSE
        @  3,50 SAY TEST01
      ENDIF
   @  4, 5 SAY "Assn  2:"
      IF ASN02 = 999.00
         @ 4,14 SAY " --    "
      ELSE
         @  4,14 SAY ASN02
      ENDIF
   @  4,40 SAY "Test   2:"
      IF TEST02 = 999.00
         @ 4,50 SAY  " --    "
      ELSE
         @  4,50 SAY TEST02
      ENDIF
   @  5, 5 SAY "Assn  3:"
      IF ASN03 = 999.00
         @ 5,14 SAY " --    "
      ELSE
         @  5,14 SAY ASN03
      ENDIF
   @  5,40 SAY "Test   3:"
      IF TEST03 = 999.00
         @ 5,50 SAY " --    "
      ELSE
         @  5,50 SAY TEST03
      ENDIF
   @  6, 5 SAY "Assn  4:"
      IF ASN04 = 999.00
         @ 6,14 SAY " --    "
      ELSE
         @  6,14 SAY ASN04
      ENDIF
   @  6,40 SAY "Test   4:"
      IF TEST04 = 999.00
         @ 6,50 SAY " --    "
      ELSE
         @  6,50 SAY TEST04
      ENDIF
   @  7, 5 SAY "Assn  5:"
      IF ASN05 = 999.00
         @ 7,14 SAY " --    "
      ELSE
         @  7,14 SAY ASN05
      ENDIF
   @  7,40 SAY "Test   5:"
      IF TEST05 = 999.00
         @ 7,50 SAY " --    "
      ELSE
         @  7,50 SAY TEST05
      ENDIF
   @  8, 5 SAY "Assn  6:"
      IF ASN06 = 999.00
         @ 8,14 SAY " --    "
      ELSE
         @  8,14 SAY ASN06
      ENDIF
   @  9,40 SAY "Proj.  1:"
      IF PROJ01 = 999.00
         @  9,50 SAY " --    "
      ELSE
         @  9,50 SAY PROJ01
      ENDIF
   @  9, 5 SAY "Assn  7:"
      IF ASN07 = 999.00
         @  9,14 SAY " --    "
      ELSE
         @  9,14 SAY ASN07
      ENDIF
   @ 10,40 SAY "Proj.  2:"
      IF PROJ02 = 999.00
         @ 10,50 SAY " --    "
      ELSE
         @ 10,50 SAY PROJ02
      ENDIF
   @ 10, 5 SAY "Assn  8:"
      IF ASN08 = 999.00
         @ 10,14 SAY " --    "
      ELSE
         @ 10,14 SAY ASN08
      ENDIF
   @ 11,40 SAY "Proj.  3:"
      IF PROJ03 = 999.00
         @ 11,50 SAY " --    "
      ELSE
         @ 11,50 SAY PROJ03
      ENDIF
   @ 11, 5 SAY "Assn  9:"
      IF ASN09 = 999.00
         @ 11,14 SAY " --    "
      ELSE
         @ 11,14 SAY ASN09
      ENDIF
   @ 12,40 SAY "Proj.  4:"
      IF PROJ04 = 999.00
         @ 12,50 SAY " --    "
      ELSE
         @ 12,50 SAY PROJ04
      ENDIF
   @ 12, 5 SAY "Assn 10:"
      IF ASN10 = 999.00
         @ 12,14 SAY " --    "
      ELSE
         @ 12,14 SAY ASN10
      ENDIF
   @ 13,40 SAY "PROJ.  5:"
      IF PROJ05 = 999.00
         @ 13,50 SAY " --    "
      ELSE
         @ 13,50 SAY PROJ05
      ENDIF
   @ 13, 5 SAY "Assn 11:"
      IF ASN11 = 999.00
         @ 13,14 SAY " --    "
      ELSE
         @ 13,14 SAY ASN11
      ENDIF
   @ 14, 5 SAY "Assn 12:"
      IF ASN12 = 999.00
         @ 14,14 SAY " --    "
      ELSE
         @ 14,14 SAY ASN12
      ENDIF
   @ 15, 5 SAY "Assn 13:"
      IF ASN13 = 999.00
         @ 15,14 SAY " --    "
      ELSE
         @ 15,14 SAY ASN13
      ENDIF
   @ 16, 5 SAY "Assn 14:"
      IF ASN14 = 999.00
         @ 16,14 SAY " --    "
      ELSE
         @ 16,14 SAY ASN14
      ENDIF
   @ 17, 5 SAY "Assn 15:"
      IF ASN15 = 999.00
         @ 17,14 SAY " --    "
      ELSE
         @ 17,14 SAY ASN15
      ENDIF
   @ 15,36 SAY "Grade average:"
   IF TOTAL = 999.00
      STORE 0.00 TO MTOTAL
   ELSE
      STORE TOTAL TO MTOTAL
   ENDIF
   @ 15,52 SAY MTOTAL
   @ 17,36 SAY "Letter Grade:                 "
   @ 17,50 SAY GRADE
   @  7,60 say "Grade Period 1"
   @  8,65 say GRADE1
   @ 11,60 say "Grade Period 2"
   @ 12,65 say GRADE2

   @ 18, 0 SAY "--------------------------------------------------"
   @ 18,50 SAY "------------------------------"
   @ 19, 0 SAY "    What do you want to correct?"
   @ 22,30 say "                                                   "

      DO CORRECT
      if .NOT. MNOASK
         @ 22,35 SAY "WORKING! Kick back for a few seconds."
         DO CALTOTAL
         STORE MTOT/MAVG TO MTOTAL
         DO GETGRADE
         REPLACE TOTAL WITH MTOTAL
         REPLACE GRADE WITH MGRADE
         store str(mtotal,6,2) to sttotal
         @ 15,52 SAY sttotal using "###.##"
         @ 17,50 SAY "     "
         @ 17,50 SAY mgrade
         STORE T TO MNOASK
         release sttotal
      endif
ENDDO
release all like m*
return


      IF TEST02 = 999.00
         @ 4,50 SAY  " --    "
      ELSE
         @  4,50 SAY TEST02
      ENDIF
   @  5, 5 SAY "Assn  3:"
      IF ASN03 = 999.00
         @ 5,14 SAY " --    "
      ELS