jamiephelps.com

Proving the sunshine since 1980.

jamiephelps.com header image 4

Entries from September 2008

Programming Style: Two Booleans, Three Possible Cases

September 25th, 2008 · 2 Comments · All Posts

Quick programming style question. If you have two boolean values and want to have a different outcome for each alternative and the case where both are true, how do you do it?

Here are the two options I have come up with.

First, a straight if-else if-else block like this: Update: I have updated this first option to [...]

[Read more →]

Tags: