Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vartype: behavior
Message
De
16/09/1998 15:20:52
Jeroen Naus
Harte-Hanks Europe
Hasselt, Belgique
 
 
À
15/09/1998 16:32:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00136852
Message ID:
00137434
Vues:
25
I think this is comparable to checking a property on a form that doesn't exist. Vartype tries to find the form first before checking the property, and
fails if it doesn't find it. On your example it tries finding the array element
before doing the check on the element.
Good tip here might be, creating your own function and using the type() or vartype() function in it, it should solve the problem.

FUNCTION checkVAR
LPARAMETER voVar, lcType
IF VARTYPE(voVar) = ALLTRIM(UPPER(lcType))
IF ISNULL(voVar)
RETURN .F.
ELSE
RETURN .T.
ENDIF
ELSE
RETURN .F.
ENDIF

Anyway it's probably some kind of notreallythewayitshouldbeism.

Greetings,
Jeroen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform