- get-environment-variable S1 #!optional S2procedure
Returns a string. If the variable S1 is currently not defined in the environment S2 is returned and defaults to the empty string.
For example, this program can be compiled and run with both CHICKEN and CRUNCH:
(module main (main) (import (scheme base) (scheme write) (crunch process-context)) (define (main) (display "Hello, I'm ") (display (vector-ref (command-line) 0)) (newline)) (cond-expand ((not crunched) (main)) (else)) )