Category : Pascal Source Code
Archive   : PIBMDOS.ZIP
Filename : YESNO.PAS
(* YesNo --- Prompt for and read Yes/No question/answer *)
(*----------------------------------------------------------------------*)
FUNCTION YesNo( YesNo_Question : AnyStr ) : BOOLEAN;
(*----------------------------------------------------------------------*)
(* *)
(* Function: YesNo *)
(* *)
(* Purpose: Prompt for and read Yes/No question/answer *)
(* *)
(* Calling Sequence: *)
(* *)
(* Yes_Answer := YesNo( YesNo_Question : AnyStr ) : BOOLEAN; *)
(* *)
(* YesNo_Question --- Text of Yes/No question to be asked *)
(* Yes_Answer --- Set TRUE if "Yes" answer given, else *)
(* set FALSE. *)
(* *)
(* Calls: GiveAwayTime *)
(* *)
(*----------------------------------------------------------------------*)
VAR
Ans_Ch: CHAR;
Ch : CHAR;
X : INTEGER;
Y : INTEGER;
BEGIN (* YesNo *)
WRITELN;
X := WhereX;
Y := WhereY;
Ans_Ch := ' ';
REPEAT
GoToXY( X , Y );
ClrEol;
WRITE( YesNo_Question, ' (y/n)? ' );
Read_Kbd( Ans_Ch );
Ans_Ch := UpCase( Ans_Ch );
UNTIL( Ans_Ch IN ['Y','N'] );
IF Ans_Ch = 'Y' THEN
BEGIN
YesNo := TRUE;
WRITE('Yes');
END
ELSE
BEGIN
YesNo := FALSE;
WRITE('No');
END;
END (* YesNo *);
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/