> Works, though maybe BillW's version IS better Not if you write mystrncpy(buffer,"Hello",59000). I've heard C described as "machine-independent assembly language", which I think says it pretty well. C-compilers aren't magic, the onus is still on you to ensure that it isn't going to generate crap. Trival example: you know and I know that "x/8" is the same as "x>>3". But does the compiler know? If it doesn't then you'll end up with something like "call __divideint16" instead of "lsr 3" -- perhaps a 5000% speed penalty just because of the way you typed it. OK, so this isn't really relevant anymore, ALL compilers are smart enough to get this one. But in the case of mystrncpy(), you know and I know that "while(n++ some bosses simply cannot DEAL with modifying a function parameter as > you're doing there Different problem. I like to say two words to micro-managing bosses (the second word is "off"). A local variable is a local variable, whether passed on the stack under the return address or allocated on top of it, or passed in register or whatever -- the point is, it's LOCAL, use it as you wish. > (I'd maybe CONST that puppy?) You could, although IMHO that's not really what const is for. Take for example: const char string_in_rom[]="Hello"; void erase(char *str) ( *str = 0; } const simply tells the compiler than the string is unwriteable, and, by exclusion, that erase() can write to str. Someday, if (when) I headspace and try to erase(string_in_rom), then the compiler can tell me to, um, cease micro-managing. -- Rich