sybase if-else

Background: after a few years of usage, i still feel the need for a few simple rules, like the simple rules in “perlreftut”. Here
they are, each in 5 words or less.

* select => parenthesis. Any select in a if-condition had better wear a pair of parenthesis. I guess they

* select => single value. Any select in a if-condition must produce a single value, including count()

* begin. Being-end is harmless. May increase code size a bit but actually often helps readability.

* no slip-through. In a if-else, either the if block or the else block must execute. Nothing (including nulls) will slip through
between the 2.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s