BCX Console Demonstration Program S49.bas

 DIM A$
 
 CLS
 
 A$ = GetEnvVar$("COMSPEC")    : ? "    COMSPEC = ", A$
 A$ = GetEnvVar$("PROMPT")     : ? "     PROMPT = ", A$
 A$ = GetEnvVar$("TEMP")       : ? "       TEMP = ", A$
 A$ = GetEnvVar$("winbootdir") : ? " winbootdir = ", A$
 A$ = GetEnvVar$("windir")     : ? "     windir = ", A$
 A$ = GetEnvVar$("PATH")       : ? "       PATH = ", A$
 
 FUNCTION GetEnvVar$(B$)
   DIM Result$
   GetEnvironmentVariable(B$, Result$, 255)
   FUNCTION = Result$
 END FUNCTION