10 REM EXAMPLE_SCANNER_PROGRAM ! ! Set up buffer to receive data. ! 20 DECLARE STRING INPUT_BUFFER, BYTE EOF, WORD INPUT_SIZE 25 INPUT_BUFFER = SPACE$(512) ! ! Initialize the scanner and open a ! file to receive the scanner data. ! 30 CALL SCN_INIT ! ! Send requests for status to the scanner ! until the scanner is ready on SCAN-TO-COM. ! 40 CALL SCN_STATUS ! ! Set loop to get records till end of file (EOF) ! is received from the scanner. ! 50 I% = 0 60 WHILE NOT EOF I% = I% + 1 PRINT " Record number: ", I% ! ! Get a record. ! 70 CALL SCN_GETREC ( INPUT_BUFFER, INPUT_SIZE, EOF) ! ! <<< User program edit checks HERE, if any >>> ! ! ! Write the record to the file if EOF is not reached. ! 80 IF (NOT EOF) THEN CALL SCN_WRITE (INPUT_BUFFER, INPUT_SIZE) END IF 90 NEXT ! ! Close the file and deinitialize the scanner. ! 100 CALL SCN_DEINIT 110 END