Reading+Environment+Variables

//by Richard Russell, May 2011//

You can read the **environment variables** associated with the current process using code similar to this: code format="bb4w" PRINT FNenvironment("PATH") PRINT FNenvironment("USERNAME") END DEF FNenvironment(envar$) LOCAL buffer%, size% SYS "GetEnvironmentVariable", envar$, 0, 0 TO size% DIM buffer% LOCAL size% SYS "GetEnvironmentVariable", envar$, buffer%, size%+1 = $$buffer% code