>George,
>
>I totally agree and apply the same rules, Except;
>
>>2. The exit from any procedure/function/method always occurs at the last line of the procedure/function/method.
>
>In somecases I exit the proc when it contributes better readability. If in some cirsumstance it is needed to discontinue the proc before any other functional code in the proc (thus in the beginning of the proc). For example a Deleterecord event on a form:
>
>IF userHasNoDeletePermission()
> RETURN False
>ENDIF
>
>...
>...
>Other code to delete the record
>
>Regarding the naming conventions, I did clearly state I've got my doubts (and i still doubt).
>
Hi Walter,
I think the above is less readable than
IF NOT userHasNoDeletePermission()
ENDIF
RETURN llresult
and that it can make debugging harder depending on the circumstances. I'd be more likely to name the function UserHasDeletePermission() simply because the function would appear to be testing whether or not the user has permission. I realize that this is an example, but I'd design it that way. In others words, test for postive results and not negative ones.
George
Ubi caritas et amor, deus ibi est