>Brad Jensen discussed coding standards, and Martin chimed in:

>  >  no single line IFs.
>Everything else you said made sense, but I've never heard of this as
>being bad practice.  What's the problem?
>Unless you mean something like (in Java, but no doubt VB has its
>       if ( someCondition() ) performSomeFunction();
>instead of
>       if ( someCondition() )
>       {
>               performSomeFunction();
>       }

I've usually used the multi-line form, especially in CL:

        IF (something goes here) THEN(DO)
        ELSE DO

I tend to use the DO/ENDDO even for a single Function.  Mainly
because programs have  a way of growing; more times than I'd care to
admit, that single Function becomes 2, then 3, and I'd have to
re-arrange to use the DO anyway.

Do the DO!

--Paul E Musselman

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.