Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Type function is not smart enough
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00714883
Message ID:
00715105
Vues:
22
>Ok, let's simplify the sitaution.
>
>Help says
>
>cExpression
>Specifies the expression to be evaluated, which can be a variable, field, memo field, or any other expression. The expression must be passed as a character string; place quotation marks around the names of memory variables, fields, and so on. If you do not place quotation marks around the expression, the TYPE( ) function evaluates the contents of the string. If the contents cannot be evaluated as a valid FoxPro expression, TYPE() returns "U" (undefined expression).
>
>When I Say ?TyPe(Test(123)) VFP expcets that Test is an array and is looking for the 123rd element of the array hence we get an error.

Jim,

What would you recive if you do place quotations, e.g.
?type("test(123)")? You would receive "U" if function test exists and U if it doesn't exist. If you would use vartype(test(123)) you would receive a type of value of the result of test function if it exists and an error, if it doesn't.

That's all, I'm saying.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform