14 Nov
2002
14 Nov
'02
4:59 p.m.
Andrew McCall a ?crit:
Is it possible to access environment variables within gpc code, for example $USER ?
There is a GetEnv function in the module gpc.pas for that purpose. e.g.
username:=GetEnv('USER');
also
username:=CStringGetEnv('USER');
See gpc.pas in the units directory for the difference.
I think he wants to embed environment variables on the compiling machine in the code.