>>>As far as I know, vfp always stops evaluating the right remainder of a logical expression if the left part evaluates to an logical value that cannot be changed anymore by the right remainder. For example, in the case of IF A OR B, the B is no longer evaluated if A evaluates to True. In a same vein, in the case of IF A=0 or BB(), the function BB is not visited if A=0.
>>>
>>>But now I am confronted with a case in a select-sql WHERE expression, where the part to the right of the OR is visited anyhow, notwithstanding the result of the left expression.
WHERE ( MOD(A,1000)#0 OR THERMO(A) )
>>>
>>>Does this sound familiar to anyone here?
>>
>>You ignores the phase of analysis,
>>and
>>Check A, it should to be NULL.
>
>It is never NULL.
Post more info.
Look this:
clear
SET NULLDISPLAY TO "I'm null"
CREATE CURSOR myTest (A I NULL)
INSERT INTO myTest VALUES (5)
INSERT INTO myTest VALUES (0)
INSERT INTO myTest VALUES (0)
INSERT INTO myTest VALUES (null)
INSERT INTO myTest VALUES (2)
INSERT INTO myTest VALUES (1)
INSERT INTO myTest VALUES (7)
INSERT INTO myTest VALUES (0)
SELECT 0
SELECT * FROM myTest;
WHERE (MOD(A,1000)#0 OR THERMO(A));
INTO CURSOR rrr
PROCEDURE THERMO(vValue)
? "recno()=",RECNO(),"A=",vValue