Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When a logical is neither .T. or .F.
Message
De
22/05/2006 17:20:09
 
 
À
22/05/2006 16:08:48
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01124079
Message ID:
01124113
Vues:
11
>Any way to identify a record if a logical field has not been set to either .T. or .F.? I know for all intents and purposes it is .F., but let's just say for argument's sake...

PMFJI,

In addition to what Tore and David advised, you might consider making the column nullable. If your logic involves scatter/gather, you lose the status of isblank. to expand David's example
create cursor x1 ( l1  l )
append blank
? x1.l1, isblank( x1.l1 ), empty( x1.l1 )
scatter memvar
? isblank(m.l1)
gather memvar
? x1.l1, isblank( x1.l1 ), empty( x1.l1 )
replace l1 with .f.
? x1.l1, isblank( x1.l1 ), empty( x1.l1 )
replace l1 with .t.
? x1.l1, isblank( x1.l1 ), empty( x1.l1 )
I had a situation where I really had to knoww if the user entered 0 or not and the only reliable way I found was to use NULLs.

Bruce
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform