Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

is olevariant variable nil?

852 views
Skip to first unread message

Daniel Franzen

unread,
Aug 25, 1999, 3:00:00 AM8/25/99
to
hi :-)

How can I find out if an OleVariant is nil?

The compiler doesn't like this:

var
anolevariant : olevariant;
begin
if anolevariant = nil then
showmessage('anolevariant is nil');

thanks

Malibu Software

unread,
Aug 25, 1999, 3:00:00 AM8/25/99
to
I thingk this works,
if anolevariant = unassigned then
yadda yadda

Daniel Franzen <is9...@student.hk-r.se> wrote in message
news:37C452...@student.hk-r.se...

Sean Weatherall

unread,
Aug 25, 1999, 3:00:00 AM8/25/99
to
Delphi Function VarIsEmpty(v : Variant) tests for UnAssigned (Empty - Not
value assigned)
and VarIsNull(v: variant) tests for Null
Both are in System.pas.

Stoeckli Martin

unread,
Aug 26, 1999, 3:00:00 AM8/26/99
to Daniel Franzen
You can use the function
bEmpty := VarIsEmpty(<OleVariant>);
For freeing the variable you use
<OleVariant> := unassigned;

0 new messages