Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I check if numeric field is 0 or blank
Message
De
26/08/1999 14:59:17
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
26/08/1999 14:29:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00257901
Message ID:
00258097
Vues:
19
>ThanK _you!! That worked great.
>Gary


Gary,

You might like to try the following for a better understanding of IsBlank(), IsNull(), and Empty().



*!* Compare IsBlank(), Empty(), and IsNull() with the following test

*!* Note that EMPTY() will return true for a zero or white space numeric
*!* ISBLANK() will successfully distinguish between the zero
*!* and the white space entry
*!* A .NULL. value is neither blank or empty.

CREATE CURSOR Dummy ;
(nDummy N NULL, nValOfDummy N NULL, lISBlank l, lISNull l, lEmpty l)

APPEND BLANK
REPLACE nValOfDummy WITH nDummy, ;
lISBlank WITH IsBlank(nDummy), ;
lISNull WITH ISNULL(nDummy), ;
lEmpty WITH EMPTY(nDummy)

APPEND BLANK
REPLACE nDummy WITH 0, ;
nValOfDummy WITH nDummy, ;
lISBlank WITH IsBlank(nDummy), ;
lISNull WITH ISNULL(nDummy), ;
lEmpty WITH EMPTY(nDummy)

APPEND BLANK
REPLACE nDummy WITH .NULL., ;
nValOfDummy WITH nDummy, ;
lISBlank WITH IsBlank(nDummy), ;
lISNull WITH ISNULL(nDummy), ;
lEmpty WITH EMPTY(nDummy)

BROWSE

*!* To return a numeric field to white space as if it has never been entered:

BLANK FIELDS LIKE nDummy
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform