home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a065 / 1.img / TBLIB.EXE / TBFWPREV.PRG < prev    next >
Encoding:
Text File  |  1992-03-09  |  510 b   |  22 lines

  1.     // TBFwPrev.prg
  2.     //
  3.     //   TBFwGoPrev()     - Move to previous record with for and while
  4.     //                      condition set. Return .T. if moved, otherwise .F.
  5.  
  6.     FUNCTION TBFwGoPrev(bFor, bWhile)
  7.  
  8.     LOCAL nSaveRecNum := recno()
  9.     LOCAL lMoved := .T.
  10.  
  11.       SKIP -1
  12.       DO WHILE !eval(bFor) .AND. eval(bWhile) .AND. !bof()
  13.         SKIP -1
  14.       ENDDO
  15.  
  16.       IF !eval(bWhile) .OR. bof()
  17.         GOTO nSaveRecNum
  18.         lMoved := .F.
  19.       ENDIF
  20.  
  21.     RETURN lMoved
  22.