| ??? 06/08/07 07:22 Read: times |
#140398 - Don't try this at home!!! Responding to: ???'s previous message |
Raghu said:
This looks impressive:
for(v=i=0;i<4;v=10*v+b[i++]-48); And with my "knowledge" of C, I think that I need to do this four times to get the four parameters? That's correct. What is that "b"? A little explanation will be appreciated. The little "b" is the same as your "buf" -- the array where the 16 raw characters are stored. Please don't pay too much attention to this example. It is fun to play around like this, trying to make things small and cryptic. That's what Jan and I were doing, kind of as a joke. But it would be really bad to put this in a real program. Instead, write something obvious and straightforward, then comment it carefully so that you can figure it out again two months later after you have forgotten what you were doing in the first place. -- Russ |



