News for hackers. Stuff that matters.
Re:A Modern App Developer and an Old-Timer System Developer ... by GFK_of_xmaspast on Sunday February 14, 2016 @07:35PM (#11100784)
This is 206, why are you using #defines instead of "const int"s.
Re:A Modern App Developer and an Old-Timer System Developer ... by pdkl95 on Sunday February 14, 2016 @07:58PM (#11100874)
Because the last time I wrote a bitmap like that was about a decade ago using a proprietary compiler for a Z80 clone that implemented a "C89-like"[1] language? Call it a bad habit from too many years working with embedded micros.

If I was using a modern(-ish) C, an enum might be more appropriate.

[1] When you only have 16k of RAM and a 256 byte stack, having "int x;" default to "static" storage instead of the stack is a feature.

Re:A Modern App Developer and an Old-Timer System Developer ... by spc476 on Monday February 15, 2016 @03:43AM (#11102203)
Assuming C code (not C++), then const int is not the same as a #define. An enum is only good if the values fit within the range of a native int.
Re:A Modern App Developer and an Old-Timer System Developer ... by shultays on Tuesday February 16, 2016 @09:21AM (#11109926)
static const's may not be optimized to literals. constexpr is not fully supported.