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:
00715012
Vues:
19
Nadya,

TYPE() works perfectly. It returns the type of an expression. The expression "SomeUDF(123)" is character because "someudf(123)" is a literal string when "SomeUDF(123)" is evaluated it becomes SomeUDF(123) which is a string of characters.

However TYPE(SomeUDF(123)) will retunr the type of the value that evaluating the expression results in, so if the UDF retuirns Character then the TYPE will retunr C.

This is why;
Var = 123
?TYPE(Var) && N && Theexpression Var evaluates to 123 which is a number
?TYPE("Var") && C The expression "Var" evals to Var which is a string
There is nothing wrong with the TYPE() function it just takes some study to fully underatand how it works.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform