Here is an email I received in response to my essay on how to write unmaintainable code.
One of my favourite unmaintainability techniques involves the C preprocessor. One of the programs I worked on in a previous life had the following definition in a public header file.
#define void int
Obviously it was added by folks when the code was being built by some ancient compiler, but it took me weeks to figure out why the compiler was complaining “this function doesn't return a value”.
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/feedback/unmain/preprocessor.html | J:\mindprod\feedback\unmain\preprocessor.html | |
![]() | Please email your feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording,
broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view | Your face IP:[38.107.179.211] | |
| Feedback | You are visitor number 11. | |