>>This is not so. Every logical field actually has three states, .T., .F. or BLANK. Blank can be test with ISBLANK() and can be set with the BLANK command (and is the default status for a newly appended record). If the logical field is NULL enabled then it can have four states, the three above as well as .NULL. which can be set with REPLACE ... WITH .NULL. and can be tested with ISNULL(). They are all mutually exclusive states.
>
>Well ok, I didnt consider .NULL. since I rarely use them. But you cant say blank and .f. are mutually exclusive states since blank logicals evaluate to false.
Thanks for the reply.
CREATE CURSOR testing (somefield l null)
APPEND BLANK
?ISBLANK somefield && .T.
REPLACE somefield WITH .F.
?ISBLANK somefield && .F.
BLANK somefield
?ISBLANK somefield && .T.
Therefore BLANK and .F. are not the same. The point I was making was that you can use a logical field to store three states (four with NULL enabled). I was in error to say that the four states are mutually exclusive since both BLANK logical and .F. evaluate to NOT TRUE (which is not the case with .NULL. which neither evaluates to TRUE or NOT TRUE). You can, however, put a four state value into a logical field if you are willing to test for BLANK and NULL.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only