Name
Unassigned Variable
Syntax
var Unassigned: Variant;
Description
The Unassigned
variable is a
Variant
value that represents an uninitialized
variable. Delphi automatically initializes every
Variant
variable to Unassigned
.
If you attempt to use an Unassigned
value in an
expression, Delphi reports runtime error 16
(EVariantError
).
Tips and Tricks
Calling
VarClear
is the same as assigningUnassigned
to aVariant
variable.VarIsEmpty
returns True forUnassigned
.
See Also
Null Variable, VarClear Procedure, Variant Type, VarIsEmpty Function |
Get Delphi in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.