You got me. I was so busy describing the dereferencing and postfix incrementing _inside_ the parenthesis, I forgot the whole thing was in a while loop. Thanks for your amplification. Martin R. Green elimar@bigfoot.com On Thu, 9 Oct 1997 15:48:51 -0800, Andrew Warren wrote: >Martin R. Green wrote: > >> > For instance, the following line is likely to be inscrutable to >> > novice C programmers, but they soon start to recognize it as a >> > string copy whenever they see it: >> > >> > while (*dest++ = *source++); >> >> Just wanted to comment, this is about as hairy as it usually gets, >> because you have two of the least understood (by novices) C concepts >> here, pointers and postfix operators. For you non-C programmers out >> there, a rough English translation is: >> >> Copy the thing pointed to by the source pointer to the location >> pointed to by the dest pointer, and increment the source and dest >> pointers AFTER the thing has been copied, ready for the next thing. > > Good explanation, Martin, but you left out one important thing: > > After every copy from source to destination, the "while" examines > the value that was copied. If the value isn't equal to 0, the > next thing is copied; if it IS equal to 0 (as it will be after > the last value in the zero-terminated string is copied), the loop > terminates and execution continues to the next instruction. > > -Andy > >=== Andrew Warren - fastfwd@ix.netcom.com >=== Fast Forward Engineering - Vista, California >=== http://www.geocities.com/SiliconValley/2499