home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
UTILS
/
S
/
TPTUTOR1.ARC
/
PROG7.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-05-27
|
919b
|
42 lines
PROGRAM PROG7;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: REPEAT statement
CHAR data type
}
VAR
Response : Char;
Correct_Response : Boolean;
BEGIN
WriteLn('Turbo Pascal seems to ');
WriteLn;
WriteLn('A. Run faster than other Pascals.');
WriteLn('B. Compile faster than others.');
WriteLn('C. Take less room in memory.');
WriteLn('D. All of the above.');
WriteLn;
REPEAT
Write('Enter your choice - A, B, C, or D: ');
ReadLn(Response);
WriteLn;
If (Response = 'D') or (Response = 'd')
THEN
Correct_Response := True
ELSE
Correct_Response := False;
If Correct_Response
THEN
WriteLn('Right!')
ELSE
WriteLn('Wrong choice, try again.');
UNTIL Correct_Response;
END.