Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: NTOM() and MTON() with NULL parameter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
BUG: NTOM() and MTON() with NULL parameter
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01029851
Message ID:
01029851
Vues:
62
NTOM it returns a different type according to the type of NULL of the parameter.
CLEAR
ON ERROR ?? MESSAGE()
? "EXPECTED Y"
* CORRECT
? 'Input datatype I : ',VARTYPE(NTOM(CAST(NULL AS I)),.T.)
? 'Input datatype N : ',VARTYPE(NTOM(CAST(NULL AS N)),.T.)
? 'Input datatype Y : ',VARTYPE(NTOM(CAST(NULL AS Y)),.T.)

* INCORRECT
? 'Input datatype X : ',VARTYPE(NTOM(NULL),.T.)

? 'Input datatype B : ',VARTYPE(NTOM(CAST(NULL AS B)),.T.)

? "EXPECTED N"
* CORRECT
? 'Input datatype I : ',VARTYPE(MTON(CAST(NULL AS I)),.T.)
? 'Input datatype N : ',VARTYPE(MTON(CAST(NULL AS N)),.T.)
? 'Input datatype Y : ',VARTYPE(MTON(CAST(NULL AS Y)),.T.)

* INCORRECT
? 'Input datatype X : ',VARTYPE(MTON(NULL),.T.)

? 'Input datatype B : ',VARTYPE(MTON(CAST(NULL AS B)),.T.)
Répondre
Fil
Voir

Click here to load this message in the networking platform