Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable numeric or character
Message
De
10/01/2014 05:54:55
 
 
À
10/01/2014 02:59:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01591614
Message ID:
01591619
Vues:
58
Type() / Vartype will fold field types memo / int, double into C / N.
While having a translation list from field into vartype dichotomy might be helpful in some situations (unless one "translates" via type() ), that will NOT really help here - at least rearrange to N,Y,Rest so that the types not available in vartype are only checked when non-numeric or checking via afields ;-)



>
>
>
>? Type_IsNumeric(m.myVar)
>
>? Type_IsChar(m.myVar)
>
>
>#define T_NUMERIC_LIST	T_NUMERIC, T_DOUBLE, 'I', T_CURRENCY
>*_______________________________________________________________________________
>
>function Type_IsNumeric(n)
>	
>	return 		inlist(vartype(m.n), T_NUMERIC_LIST)
>
>endfunc
>*_______________________________________________________________________________
>
>function Type_IsChar(s)
>
>	return 	inlist(vartype(m.s), T_CHARACTER, T_MEMO, 'V', 'Q', 'W') 
>
>endfunc
>*_______________________________________________________________________________
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform