home *** CD-ROM | disk | FTP | other *** search
- {A program to illustrate the use of some DOS Environment functions.}
-
- {$I DOS.INC}
-
- {$I ENVIRONM.INC}
-
- TYPE
- MaxString = STRING[255];
-
- VAR
- StrIn,
- StrOut : MaxString;
-
- BEGIN
- WriteLn('At the prompt, enter Q to quit, or just hit Enter to display this');
- WriteLn('program''s "home directory".');
- WriteLn;
- REPEAT {until StrIn = 'Q'}
- Write('Enter a string to be found in the DOS Environment: ');
- ReadLn(StrIn);
- IF NOT(StrIn = 'Q') THEN BEGIN
- Write('The DOS Environment string for ');
- IF StrIn = '' THEN WriteLn('this program''s home directory')
- ELSE WriteLn(StrIn);
- IF FoundInEnv(StrIn, StrOut) THEN WriteLn('is ', StrOut)
- ELSE WriteLn('could not be found.');
- WriteLn;
- END;
- UNTIL StrIn = 'Q';
- END.
-
- { Karl Brendel, CIS 73307,3101
- 718 East B Avenue
- Hutchinson, Kansas 67501 }