Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compare field value with zero
Message
 
 
À
27/11/2011 10:31:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01529879
Message ID:
01529881
Vues:
34
>>Hi,
>>
>>How do I check if a value in the field is 0 (zero) if the decimal of the field could be any number (e.g. 1,2,4). For example, if field MyField type is Numeric(12,4), and the value in the field is zero, will the following return .T.?
>>
>>
>>? evaluate( cTableAlias + ".MyField" ) = 0
>>
>>
>>That is, do I need to have the decimal 0s specified on the right side of the equation above?
>>
>>TIA.
>
>No, and you can also use
>
>
>  ?empty(eval(forceext(m.cTableAlias, 'MyField')))
>
I have used EMPTY() on a numeric field before but was never 100% sure that is a valid method of determining if value is 0. Thank you for confirming it.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform