On 12-Sep-08 13:01, Gail wrote:
>
> "Invisible" <voi### [at] devnull> wrote in message
> news:48ca3efa$1@news.povray.org...
>
>>
>> while(*v++ = *s++);
>>
>> I mean, what THE HELL...?
A nice example of language design inspired by hardware (and vice versa).
May result in very fast code.
>>
>
> I doubt that's the recommended way of copying an array any longer
I don't think it is a problem as long as the string is known to be null
terminated. Don't put it in a library though. These are bound to be used
by people who have never heard of the concept of preconditions. Or
yourself in a weak moment after midnight.
Post a reply to this message
|