Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

GetValue class method

Project: Environment Variables Unit

Unit: PJEnvVars

Class: TPJEnvironmentVars

Applies to: ~>3.0

class function GetValue(const VarName: string): string;

Description

Returns the value of a given environment variable.

Parameters:

Returns

Important: Because GetValue returns the empty string both for environment variables that exist but have no value and for those that do not exist, you can’t use this method to check if an environment variable exists in the environment block. Use the Exists method for this purpose.