System.Variants.NullStrictConvert

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

NullStrictConvert: Boolean = True;

C++

extern DELPHI_PACKAGE bool NullStrictConvert;

Properties

Type Visibility Source Unit Parent
variable public
System.Variants.pas
System.Variants.hpp
System.Variants System.Variants

Description

Specifies whether Null conversion is an error.

NullStrictConvert determines the outcome of attempts to convert Null variants to other types. If NullStrictConvert is true (default), attempting to convert a Null variant raises a EVariantTypeCastError, unless the conversion is to a custom variant that defines a conversion from Null. If NullStrictConvert is false, then conversion from Null follows the following rules:



Destination Conversion result

Numeric type

Zero

String type

Value of NullAsStringValue global variable. (Default: empty string.)

Boolean

False.



See Also