PROGRAM test_music (Input,Output); { This program compares the conformance of an input note sequence to the set of example sequences in 'SEQUENCE.DAT'. } { Copyright 1989 by Wesley R. Elsberry. All rights reserved. Commercial use of this software is prohibited without written consent of the author. For information, bug reports, and updates contact Wesley R. Elsberry 528 Chambers Creek Drive South Everman, Texas 76140 Telephone: (817) 551-7018 } USES DOS, misc1, ANSI_Z, globals, clasinst; {General} VAR ii, jj, kk : INTEGER; notes : notes_; sinch : CHAR; scon,infname : STRING; inf : TEXT; cnt,success : INTEGER; BEGIN Success := 0; Cnt := 0; FOR ii := 1 TO 5 DO BEGIN notes[ii] := 0; END; {Get filename to test} Write('Name of file to process: '); Readln(infname); {Open for input} Assign(inf,infname); Reset(inf); REPEAT Readln(inf,notes[5]); IF (classical_instructor(notes) = 1) THEN BEGIN INC(success); END; INC(cnt); FOR ii := 1 TO 4 DO BEGIN notes[ii] := notes[ii+1]; END; UNTIL (Eof(inf)); Close(inf); Writeln('Count = ',cnt:5,' Successes = ',success:5); END.