Cesar Providenti (@cprovidenti)
I much prefer this (Pedro's) response, and would take it one step further.A (finite) state machine is a mathematical construct, and as such is represented via mathematical...
The cast annoys the hell out of me, because it is so self-evidently redundant (even without referring to the return value of the function), and as a result, reduces...
This is not exactly an answer to the original question, but here's a trick to use just in case you find yourself "forced" to write a function or two in assembler:Write...
Without the use of the div function, negative quotients may be rounded towards zero or away from zero, which makes implementing a portable "round quotient to nearest...
The reference for these kinds of questions is Andrew Koenig: C Traps and Pitfalls.As I recall, the answers are exactly as you were told, sadly enough.And don't get...
So what is the range then: 0 to 100 or -32768 to 32767?In many cases, the size is determined by something outside the processor, so there you should use the appropriate size-specific...
How about using unsigned int and (signed) int, unless you have a specific need to use a particular size? That's precisely their purpose, as I recall.E.g., in the...
Good suggestion, but beware of the "gotcha" concerning the length passed to strncmp: which length do you specify, the length of the string you expect to receive,...
Maybe not "offend" per se, but perhaps "upset"? One of my co-workers comes from China, and his entire family is "trapped" in the quarantined region. They're fine...
Thumbs up with this reply (also), with one caveat: I would defer creating the "newbies" forum (or sub-forum) for now, as there is only one (so-called) "newbie" to...
A very good twist on this topic. That said, I would see such schedulers as, in effect, bare metal, but with an API (and/or a framework) to support the context switch...
Use this form to contact cprovidenti
Before you can contact a member of the *Related Sites:
- You must be logged in (register here)
- You must confirm you email address