home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / toolkid / dir.dem < prev    next >
Encoding:
Text File  |  1980-01-01  |  1.4 KB  |  40 lines

  1. USES CRT,IOSTUFF,DIR;
  2.  
  3. VAR
  4.  
  5.   Menu1 : String[80];
  6.   InKey: Char;
  7.   Temp : AnyStr;
  8.  
  9. BEGIN
  10.          SetColor(LightGray,Black);
  11.          ClrScr;
  12.          WriteSt('The ShowDir Procedure prints a directory of files      ',5,5);
  13.          WriteSt('on the screen.  The ChangPath Procedure allow the user',5,6);
  14.          WriteSt('to change the path.   Hit any key to continue.        ',5,7);
  15.          InKey := ReadKey;
  16.  
  17.          Repeat
  18.           ShowDir;        { Display a directory for current path }
  19.           ChangePath;     { Allows user to change path }
  20.           WriteSt('Do ShowDir/ChangePath again?',1,25);
  21.           InKey := ReadKey;
  22.          Until InKey in ['n','N'];
  23.  
  24.          ClrScr;
  25.          WriteSt('The PickFile Function allows the user to pick a file',5,5);
  26.          WriteSt('using a point and shoot lotus-like menu.  The user  ',5,6);
  27.          WriteSt('can change the path by hitting F2.  The file name   ',5,7);
  28.          WriteSt('is returned and the path remains changed so that the',5,8);
  29.          WriteSt('file may be opened by Reset.  Hit any key to proceed.',5,9);
  30.          InKey := ReadKey;
  31.  
  32.          Repeat
  33.           Temp := Pickfile;             {Pick a file}
  34.           If Temp <> '' then WriteSt('File '+Temp+' selected.',1,24)
  35.                         else WriteSt('No File selected.',1,24);
  36.           WriteSt('Do PickFile again?',1,25);Clreol;
  37.           InKey := ReadKey;
  38.          Until InKey in ['n','N'];
  39.  
  40. End.