qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ENVIRON$ Function Programming Example
  QuickSCREEN      Details     Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
ENVIRON$ Function Programming Example
 
This example uses the ENVIRON$ function to print the current settings
in the environment-string table:
 
CLS      ' Clear screen
I = 1
DO WHILE ENVIRON$(I) <> ""
    PRINT ENVIRON$(I)
    I = I + 1
LOOP
 
Sample Output
 
COMSPEC=C:COMMAND.COM
TMP=c:tmp
PATH=C:TOOLS;C:\BIN
PROMPT=$ec4$l$ec7$p$ec4$g$ec7$eb1
INIT=c:tools
LIB=c:lib
INCLUDE=c:\include