home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
turbopas
/
ttutor2.lbr
/
PROG15C.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-08-02
|
1KB
|
56 lines
PROGRAM PROG15C;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: Screen messages
Editing data entered
}
TYPE
Name_Type = String[12];
VAR
F_Name : String[12];
PROCEDURE Print_Entry_Screen;
BEGIN
ClrScr;
WriteLn(' PERSONAL DATA ENTRY SCREEN');
WriteLn;
WriteLn('First Name:');
WriteLn;
WriteLn(' Last Name:');
WriteLn;
WriteLn(' Phone No:');
END;
FUNCTION OK(String_Entered : Name_Type) : Boolean;
VAR
Response : Char;
BEGIN
GotoXY(1,23);
Write('Is ', String_Entered, ' correct? (Y or N) ');
ReadLn(Response);
IF (Response = 'y') OR (Response = 'Y')
THEN
OK := TRUE
ELSE
OK := FALSE;
END;
PROCEDURE Get_First_Name(VAR First_Name : Name_Type);
BEGIN
REPEAT
GotoXY(13,3);
Read(First_Name);
UNTIL OK(First_Name);
END;
BEGIN
Print_Entry_Screen;
Get_First_Name(F_Name);
END.