Variant.Empty

Syntax

Empty: Variant;

Description

The Empty property returns empty value.

Comments

The selection of empty value for variable of the Variant type leads to memory allocation for the variable. Empty value will be stored in variable till any other value is set. If empty value is selected for variables having simple data types, default value of corresponding type will be set for them:

Example

Sub UserProc;
Var
    v: Variant;
    d: DateTime;
Begin
    //If v is not empty, set the empty value
    If Not v.IsEmpty Then
        v := Variant.Empty;
    End If;
    //Get current date
    d := DateTime.Now;
    Debug.WriteLine(d);
    //Set empty value for date
    d := v;
    Debug.WriteLine(d);
End Sub UserProc;

See also:

Variant