Empty: Variant;
The Empty property returns empty value.
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:
For numeric types (Currency, Decimal, Double, Integer) - 0.
For string and character types (String and Char) - "".
For logical type - False.
For date - 30 December 1899.
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: