dear friends,
I know that if want to use an external variable/procedure in fpc, i
should use the following code:
function GetEnvironment (const Name: PChar): PChar; cdecl; external 'c'
name 'getenv';
but how could i add for example GetEnvironment function to a class
(TEnvironment)!
Is
This particular function could be declared as this:
TEnvironment = class
public
class function GetEnvironment(const Name: PChar): PChar; cdecl;
end;
class function GetEnvironment(const Name: PChar): PChar; cdecl; external
'c' name 'getenv';
Of course this is not very useful but the idea for
dear friends,
I know that if want to use an external variable/procedure in fpc, i
should use the following code:
function GetEnvironment (const Name: PChar): PChar; cdecl; external 'c'
name 'getenv';
Note that this procedure is already available as fpgetenv from unit
baseunix, and in a