Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
how to determine if a var is = nothing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00413285
Message ID:
00413459
Vues:
24
>>
If Not oTest Is Nothing Then
>
>Just curious, are either of IsEmpty() or IsNull() the same as the above?

No, test the following in VBScript
Dim oObj
Set oObj = Nothing
If IsObject(oObj) Then
  MsgBox "It's an object"
  IF IsNull(oObj) Then
    MsgBox "...and it's null"
  Else
    MsgBox "...but it's not null"
    If IsEmpty(oObj) Then
      MsgBox "...and it's emtpy!"
    End if
  End if
End If
You'll get two messageboxes. The first will say it's an object, and the second will say that it's not null.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform