Category : Pascal Source Code
Archive   : TOPS.ZIP
Filename : GETLINE.DEM

 
Output of file : GETLINE.DEM contained in archive : TOPS.ZIP
PROGRAM GETLINE_DEMO;
USES IOSTUFF,GETLINE,CRT;
VAR
TempStr : AnyStr;
Ch : Char;
BEGIN
ClrScr;
WriteSt('Function GetStr reads a string off the screen. ',5,7);
WriteSt('A default string is written on the screen which ',5,8);
WriteSt('may be edited by the user. If the user types ',5,9);
WriteSt('a character first, the routine assumes the user ',5,10);
WriteSt('wants to input an entire new string. If he first ',5,11);
WriteSt('uses editing keys (backspace or left arrow) the ',5,12);
WriteSt('routine assumes he wants to edit the default. ',5,13);
WriteSt('The ins, backspace, del, home and end keys work. ',5,14);
WriteSt('Field: ',5,5);
SetColor(Black,LightGray);
WriteSt(' ',13,5);
TempStr := 'Some Stuff'; { Set default string }
Repeat
SetColor(Black,LightGray);
TempStr := GetStr(13,5,20,TempStr); { Read string at location }
{ 13,5 length 20 with default }
{ set initially to TempStr }
If TempStr = '' then exit; { nul string returned on escape key }
SetColor(Cyan,Black);
WriteSt('You entered ['+TempStr+'] Do it again ?',5,25);
Clreol;
Ch := ReadKey;
Until Ch in ['n','N'];
END.

  3 Responses to “Category : Pascal Source Code
Archive   : TOPS.ZIP
Filename : GETLINE.DEM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/