Mad Man with a Compiler
Monday, June 19, 2017
Go To Statement Considered Helpful (part 5: Fun with Switches)
›
For my final segment on the use of gotos, let us not forget one important hidden goto. The switch statement is essentially a goto with a var...
Go To Statement Considered Helpful (part 4: Tail Recursion)
›
One other place where goto can be useful is in implementing tail recursion. As you should recall, tail recursion is when a function returns ...
Go To Statement Considered Helpful (part 3: Finding Matches in a Loop)
›
Another time I often find use for a goto is in a for loop that is scanning an array to find a match. If a match is found, a break terminates...
Go To Statement Considered Helpful (part 2: Nested Loops)
›
If you're in a nested loop in C code, and you want to issue a break or continue statement, but want it to apply to the outer loop, you...
Go To Statement Considered Helpful (part 1: Exceptions)
›
The most obvious use of a goto statement in C is for exception handling. Many people before have noted that this is one good use of gotos. ...
Go To Statement Considered Harmful (revisited)
›
Hopefully you've heard of the famous letter by Edsger Dykstra, "Go To Statement Considered Harmful." This was one of the most...
Thursday, May 25, 2017
Nice Code Blocks in Blogger
›
This post is mostly for my own use, but I figure some others might like it, too. You may have noticed that I have some nice code blocks in ...
‹
›
Home
View web version