Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming conventions again........
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00258085
Message ID:
00258956
Views:
17
>>I think the above is less readable than
>>IF NOT userHasNoDeletePermission()
>>  * Stuff to delete
>>ENDIF
>>RETURN llresult
PMFJI- I completely agree. Tests like that are a pet peeve and should be erradicated at all costs :)
>
>Perhaps rule #12 - No double negatives in test expressions.
>
>Looking through the VFP FFC's I just found this.
>
IF NOT tlNoShow
>    ** Do I do it or not?
>ENDIF
>
>** Much clearer
>
>IF tlNoShow && Don't do it
>   ** Stuff to do
>ENDIF
> -or-
>IF NOT tlShow && Don't do it
>   ** Stuff to do
>ENDIF
Hmm, applying English syntax rules.:-) Actually, in thinking about it I think my tendency is to name Boolean functions is such way that they're indicative of a successful result. (i.e. IF TableOpened(< filename >), etc.)
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform