Hi Tamar
> You're right, but the reason for doing it that way, at least in my case, is that I'm adding a parameter to something that already works. I want to be able to omit the parameter where I'm already calling the function and use it only when I need the new case, so I'll set the parameter up to be True for whichever is the new case.
Absolutely - I do exactly the same thing, for exactly the same reasons. However, I do try to make it so that parameter name is appropriate to the situation, then I can just test for it being positive. As Eric says,
"IF NOT llNOTALLOWED " (or, even worse, "IF !llNotAllowed")
is a double negative (IF NOT NOT_ALLOWED = IF ALLOWED). If the variable (or parameter) had simply been named "llAllowed" the end result is the same but the code is much clearer:
IF llAllowed
*** OK
ELSE
*** Not Allowed
ENDIF
If the default is .F. - as for a parameter that is not passed explicilty, then even the test for the negative condition is clearer (i.e. "IF NOT llAllowed" )
Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA