Dan Saks, Author at Embedded.com - Page 9 of 11

Dan Saks

Dan Saks is president of Saks & Associates, a C/C++ training and consulting company. For more information about Dan Saks, visit his website at www.dansaks.com. Dan also welcomes your feedback: e-mail him at dan@dansaks.com.

More on enumerations

Here are some additional tips for using enumerations as loop counters and for displaying enumeration names. My recent columns have been about using enumeration variables…

Enumerations Q & A

It's mailbag time. In response to reader feedback, Dan takes a moment to clarify some nuances of using enumerations. A few months ago I wrote…

Well-Behaved Enumerations

Whether you use enumerations to count up or down, be careful at the boundaries. Values just beyond the ends must have valid representation. In my…

Enumerations as Counters

Loops that step through enumerations can be very handy. With a little thought, you can make them clearer and more robust. I'm rather fond of…

Tag vs. Type Names

C treats tags as second class types. C++ isn't much kinder. Here's how to give them first-class treatment in both languages. Identifiers are among the…

Sequence Points

Overcomplex statements can confuse your compiler. Knowing where the sequence points are can help make your intentions clear. Both the C and C++ Standards are…

As Precise as Possible

Both the C and C++ Standards leave gray areas in the language. If you don't know why, those gray areas can look like black holes….

Symbolic Constant Expressions

While symbolic constants will help your code, you can overuse them. Symbolic constant expressions can be just as useful, but without the clutter. For the…