* GP3.CMD

@  0,40 say "THIRD GRADING PERIOD"
@  3,10 say "How Many Weeks Were There in ------->"
store  "   " to mgone
store "    " to mgtwo
store "    " to mgthree
store f to mweeks
do while .not. mweeks
    @  5,15 say "Grading Period 1 ....? " get mgone pict "####"
    @  7,15 say "Grading Period 2 ....? " get mgtwo pict "####"
    @  9,15 say "Grading Period 3 ....? " get mgthree pict "####"
    read
    @ 13, 0 say " "
    input "                  Is Entry Correct <Y/N> ? " to mweeks
enddo

erase
@ 12,30 SAY "PRINTING.  PLEASE WAIT.   "
SET CONSOLE OFF
set print on
? PLINE
?? PEMPH
do while .not. eof
    store val(mgone) to mone
    store val(mgtwo) to mtwo
    store val(mgthree) to mthree
    if GRADE1 = "NM"
        store 0 to mone
        store 0 to mfirst
    else
        store GRADE1 to mnGRADE
        do LETGRADE
        store mtoto * mone to mfirst
    endif
    if GRADE2 = "NM"
        store 0 to mtwo
        store 0 to msecond
    else
        store GRADE2 to mnGRADE
        do LETGRADE
        store mtoto * mtwo to msecond
    endif
    if  GRADE = "NM"
        store 0 to mthree
        store 0 to mthird
    else
        store GRADE to mnGRADE
        do LETGRADE
        store mtoto * mthree to mthird
    endif
    store mone + mtwo + mthree to maverage
    store (mfirst + msecond + mthird)/maverage to mav
    do FINGRADE
    ? NAME + "    "
        ?? GRADE1 + "  "
        ?? GRADE2 + "  "
        ?? GRADE  + "  "
        ?? ngrade + "           "
        ?? ENTER
        ?? phalf
    skip
enddo
? PENDE
if peject
    EJECT
endif
? PENDS
set print off
SET CONSOLE ON
return
rst
    else
        store GRADE1 to mnGRADE
        do LETGRADE
        store mtoto * mone to mfirst
    endif
    if GRADE = "NM"
        store 0 to mtwo
        store 0 to msecond
    else
        store GRADE to mnGRADE
        do LETGRADE
        store mtoto * mtwo to msecond
    endif
    store mone + mtwo to maverage
    store (mfirst +