help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

GetEnvironmentVariableCount

Return the number of variables in the environment.

Declaration

Source position: osutilsh.inc line 22

function GetEnvironmentVariableCount: Integer;

Description

GetEnvironmentVariableCount returns the number of variables in the environment. The number is 1 based, but the result may be zero if there are no environment variables.

Errors

If there is no environment, -1 may be returned.

See also

GetEnvironmentString

  

Return an environment variable by index.

GetEnvironmentVariable

  

Return the value of an environment variable.

Example

{$h+}
program example92;

{ This program demonstrates the
  GetEnvironmentVariableCount function }

uses sysutils;

Var
  I : Integer;

begin
  For I:=1 to GetEnvironmentVariableCount do
    Writeln(i:3,' : ',GetEnvironmentString(i));
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505