On 4 Apr 2005 at 12:58, Andy Ball wrote:
Hello,
ASB> How do I read an environment variable from my gpc > Pascal program?
ElB> Try predefined function GetEnv in unit gpc.pas: > function GetEnv (const EnvVar: String): TString;
How do I tell gpc that my program uses the gpc unit?
program foo; uses gpc; begin Writeln ('Your path = ', GetEnv ('PATH')); end.
Also, what is a TString?
It is defined in gpc.pas (as "String (2048)", IIRC).
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Web: http://www.greatchief.plus.com/