program Quest; uses crt; var last_line : integer; {----------------------------------------------------------} function Does_File_Exist(filename:string):boolean; var f:file; BEGIN {$I-} assign(f,filename); reset(f); close(f); {$I+}; Does_File_Exist := (IOResult = 0) AND (filename <> ''); END; {---------------------------------------------------------------} Procedure load_questions; var FileChar : file of char; question : boolean; flip_flop : integer; data,press : char; begin If Does_File_Exist('quest.txt') = false then begin end; If Does_File_Exist('quest.txt') = true then begin assign (FileChar,'quest.txt'); reset(FileChar); flip_flop:=0; repeat { textbackground(0); textcolor(2); } clrscr; gotoxy(1,3); writeln('±±±± ± ± ±±± ±±± ±±±±±'); writeln('± ± ± ± ± ± ±'); writeln('± ± ± ± ±± ±±± ±'); writeln('±± ± ± ± ± ± ±'); writeln('±±±± ±±±± ±±± ±±± ±'); writeln(' ± Revision tester V1.0'); gotoxy(1,11); { textcolor(15); } if flip_flop=0 then begin write('>>> Q U E S T I O N <<<') end; if flip_flop=1 then begin write('>>> A N S W E R <<<'); end; gotoxy(1,12); { textcolor(7); } write('ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ'); write('ΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»'); gotoxy(1,13); { if flip_flop=0 then textcolor(14); if flip_flop=1 then textcolor(cyan); } repeat read(FileChar,data); if (data<>chr(10)) and (data<>'!') then write(data); until (data=chr(13)) or (data='!'); if data='!' then begin { textcolor(14+blink); } gotoxy(25,13); write('<<< End of Revision Test >>>'); end; { textcolor (7); } gotoxy(1,14); write('ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΛΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ'); write('ΝΝΝΝΝΝΝΝΝΝΝΝΛΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ'); gotoxy(1,15); gotoxy(25,15); writeln('Ί Press [SPACE] to continue Ί'); gotoxy(25,16); writeln('ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ'); repeat press:=readkey; until (press = chr(32)) or (press = chr(27)); flip_flop := flip_flop+1; if flip_flop = 2 then flip_flop := 0; until (data='!') or (press=chr(27)); close(FileChar); end; end; {---------------------------------------------------------------} begin load_questions; end.