Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When a logical is neither .T. or .F.
Message
From
22/05/2006 17:20:09
 
 
To
22/05/2006 16:08:48
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01124079
Message ID:
01124113
Views:
12
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform