; SetEnv Example ; -------------- ; SetEnv stores a value in this program's environment block. ; Child programs started later inherit it, so it is a simple way to ; hand a setting to a tool or level editor you launch with ExecFile. Print "Before : ["+GetEnv$("BLITZ3D_DEMO_MODE")+"]" ; Store a value SetEnv "BLITZ3D_DEMO_MODE","normal" Print "Set 'normal': ["+GetEnv$("BLITZ3D_DEMO_MODE")+"]" ; Writing again simply replaces the old value SetEnv "BLITZ3D_DEMO_MODE","nightmare" Print "Overwritten : ["+GetEnv$("BLITZ3D_DEMO_MODE")+"]" ; An empty value deletes the variable, which is how you clean up SetEnv "BLITZ3D_DEMO_MODE","" Print "Cleared : ["+GetEnv$("BLITZ3D_DEMO_MODE")+"]" Print "" Print "The change lives inside this program only - your desktop and" Print "any program already running keep their own environment." Print "" Print "Press any key to close the example" WaitKey End