(* Copyright (C) 1992, Digital Equipment Corporation *) (* All rights reserved. *) (* See the file COPYRIGHT for a full description. *) (* *) (* by Steve Glassman, Mark Manasse and Greg Nelson *) (* Last modified on Mon Feb 24 13:56:57 PST 1992 by muller *) (* modified on Wed Sep 11 15:22:39 PDT 1991 by msm *) <*PRAGMA LL*> UNSAFE MODULE Env; IMPORT M3toC, Text, Cstdlib; PROCEDURE Get(e: Text.T; VAR res: Text.T): BOOLEAN RAISES {} = (* If e is an environment variable, res is set to its value, and TRUE is * returned. If e is not an environment variable, res is unchanged, and * FALSE is returned. *) VAR cRes := Cstdlib.getenv(M3toC.TtoS(e)); BEGIN IF cRes = NIL THEN RETURN FALSE; ELSE res := M3toC.CopyStoT(cRes); RETURN TRUE; END; END Get; BEGIN END Env.