[Gambas-user] IsObject(NULL)
Demosthenes Koptsis
demosthenesk at ...626...
Wed Nov 24 14:00:26 CET 2010
On Wed, 2010-11-24 at 21:57 +1030, Bruce Bruen wrote:
> I really don't see a problem here.
> Directly from the help:
> "IsObject
> Returns TRUE if the vRef is an object or a null reference.
> IsObject(NULL) doesn't refer to the NULL constant being an object, it is
> answering correctly that a vRef=NULL is a null reference!
>
ok, may be Bruce is right here,
NULL can be a reference to a NULL object but also a Variant or a Dynamic
array or anything with a NULL reference.
So IsObject() cannot determine the reference to object but to a NULL
reference.
i was just thinking if there is a way the IsObject() can be more
accurate if something is NULL object or anything else.
I was thinking
if it was a NULL object, ok it is an object
If it was anything else NULL, is not an object
for example
DIM aStrings AS String[] 'is a null object
PRINT IsObject(aStrings) 'True
DIM v AS Variant = NULL
PRINT IsObject(v) 'here i expected false
i tried to determine this difference with TypeOf
DIM aStrings AS String[] 'is a null object
PRINT TypeOf(aStrings) 'but i get 15 NULL value
DIM v AS Variant = NULL
PRINT TypeOf(v) 'again 15 NULL value instead 11
so i think there is no way to make difference of objects or anything
else if they are NULL.
--
Regards,
Demosthenes
More information about the User
mailing list