[LCP]which one first?

Vincent Penquerc'h Vincent.Penquerch at artworks.co.uk
Tue Mar 12 01:54:04 UTC 2002


> > for(i = 0; buf[i] != ' ' && buf[i] != '\0'; value[i] = buf[i], i++);

[...]

> 1) value[i] = buf[i]  will be done first

Also, that construct was probably done that way to shield one from
the undefined order of evaluation of value[i] and buf[i], as
value[i++] = buf[i] or value[i] = buf[i++] would be undefined.

-- 
Vincent Penquerc'h 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/linuxcprogramming/attachments/20020312/7d42e8fc/attachment.htm 


More information about the linuxCprogramming mailing list