About The Contest
The first ever Olympiad of Misguided Geeks contest at Worse Than Failure (or OMGWTF for short) is a new kind of programming contest. Readers are invited to be creative with devising a calculator with the craziest code they can write. One lucky and potentially insane winner will get either a brand new MacBook Pro or comparable Sony VAIO laptop.
Entry #100280: conditionals are for wusses, real programmers use goto!
My entry is mostly taken directly from the GTK skeleton. (Why wright code I don't have to?) Almost all of the relevant logic is in a single function that is called once for each button push. That function has no control statements other than goto's and no function calls. All of it's functionality (including atoi and ftoa) is implemented using arrays of goto labels and label variables (this uses a GCC extension). The interesting things is that some of the logic is actually cleaner because of this.