!CHKVER.BAS - reads VERIFY.LST and reports only errors
MAP1 A,S,80                          ! string for MDL lines
MAP1 X,F                             ! number of lines processed

LOOKUP "VERIFY.LST",X
IF X<1 THEN GOTO NOFILE

OPEN #1,"VERIFY.LST",INPUT           ! VERIFY/F always makes VERIFY.LST
X=0
 
LOOP: INPUT LINE #1,A                ! get MDL line
      IF EOF(1) THEN GOTO QUIT       ! end-of-file condition
      X=X+1                          ! 1 more line processed
      IF INSTR(1,A,"?") OR   &          
         INSTR(1,A,"-")      &         
         THEN ?A                     ! if there is a ? or - it 
                                        ! means an error  
                                        ! ? short for 'PRINT' 
      GOTO LOOP                      ! loop until EOF


QUIT: PRINT "Total files --";X-3     ! don't count the last 3 lines
      CLOSE #1                       ! always close the file
      END

NOFILE: PRINT "Invalid MDL format"
	END