In one of my apps I just found and fixed a subtle edge-case bug caused by short-circuiting of logical operators. With my coding style I'm not usually vulnerable to it so it was interesting to be reminded of this feature of VFP.
LOCAL ;
llFlag
llFlag = .F.
CLEAR
IF MyUDF( "First Argument" ) AND llFlag
ENDIF
IF llFlag AND MyUDF( "Second Argument" )
ENDIF
RETURN
FUNCTION MyUDF ( tcArgumentPosition AS String )
?"MyUDF( ) called when it is " + tcArgumentPosition
ENDFUNC
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up