??? 10/28/08 21:40 Read: times |
#159438 - C can thrill you Responding to: ???'s previous message |
dsend(to, from, count) char *to, *from; int count; { int n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } } I agree with Richard's comments in general. Most of my programming is low-level, close to the hardware. C is an appropriate level of abstraction for me - enough above assembly to be beneficial, but still low-level enough to easily map to the hardware. Yes, C makes it easy to shoot yourself in the foot but it doesn't do it for you. If shooting yourself in the foot hurts, then don't do it. |