IRegistryKey.WriteDouble

Syntax

WriteDouble(ValueName: String; Value: Double);

Parameters

ValueName. Name of the parameter, which value should be changed.

Value. Value that should be set for parameter in the registry.

Description

The WriteDouble method changes value of the parameter containing real numbers.

Comments

If the parameter or subkey do not exist, it is created automatically. If the parameter exists, the type and value is changed according to the entered data.

If it is required to change value of the default parameter, pass empty string ("") as a name.

Example

Executing the example requires that the registry contains a parameter named Param1 located in the subkey [HKEY_CURRENT_USER\Software\MyProject\Params].

Add a link to the Registry system assembly.

Sub UserProc;
Var
    RegKey, SubKey: IRegistryKey;
Begin
    
// Get subkey with user settings
    RegKey := RegistryClass.CurrentUser;
    SubKey := RegKey.OpenSubKey(
"Software\MyProject\Params"True);
    
// Set real value for parameter
    SubKey.WriteDouble("Param1"3.14);
End Sub UserProc;

After executing the example the parameter named Param1 located in the subkey [HKEY_CURRENT_USER\Software\MyProject\Params] is set to the real value 3,14.

See also:

IRegistryKey