home *** CD-ROM | disk | FTP | other *** search
- {$R-,S-}
- uses
- eco_env
-
- ;
-
-
-
- var
- e : envrec;
- ss : string;
- vs : string;
- status : integer;
-
-
- begin
- ss := programstr;
- if length(ss) <> 0 then writeln('Program name: ', ss, ^m^j);
-
- {dump the current environment}
- currentenv(e);
- if e.envseg = 0 then begin
- writeln('Current environment not found');
- halt;
- end;
- write('Current environment (', e.envlen, ' bytes)');
- dumpenv(e);
- writeln;
-
- {dump the master environment}
- masterenv(e);
- if e.envseg = 0 then begin
- writeln('Master environment not found');
- halt;
- end;
- write('Master environment (', e.envlen, ' bytes)');
- dumpenv(e);
- writeln;
-
- {demonstrate changes to the master environment}
- writeln('Change the master environment. Enter empty string to quit');
- repeat
- writeln;
- write('String to set: ');
- readln(ss);
- if length(ss) <> 0 then begin
- write('Value: ');
- readln(vs);
- if not setenvstr(e, ss, vs) then writeln(
- 'Insufficient environment space'
- ) else dumpenv(e);
- end;
- until length(ss) = 0;
- end.
-