On 05/11/2011 12:48 PM, [email protected] wrote:
>> From: Philippe Gerum [mailto:[email protected]]
>> Sent: Wednesday, May 11, 2011 11:21 AM
>> ...
>> Also, let's avoid constructs like these:
>>
>>> buf = iovec->iov_base, count = iovec++->iov_len;
>>
>> Disk space is cheap so we can afford a few more characters per line;
>> ...
>
> Could you please explain what you mean by this? I can imagine to put a few
> more characters into the line above by changing it to
>
> buf = iovec->iov_base, count = iovec->iov_len, ++iovec;
>
> but this would seem to contradict your recommendation below.
>
>> In short, one executable statement per line is desired, our code should
>> have nothing to hide.
>
> Since the above code line contains only one statement, I assume you mean one
> assignment-expression, and will do accordingly.
>
> By the way, what is your convention regarding goto?
goto is allowed, but use it only when needed. Meaning:
- if there is a way to arrange the control flow without goto and without
resorting to boolean flags variables, or to code duplication, do it, do
not use goto;
- otherwise use goto, choosing a readable label, as the only thing which
makes goto readable is the label you choose.
--
Gilles.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help