GCI Task review: breaking up long lines

Ralf Corsepius ralf.corsepius at rtems.org
Wed Dec 5 08:36:48 UTC 2012


On 12/05/2012 08:54 AM, Thomas Dörfler wrote:
> On 05.12.2012 07:25, Ralf Corsepius wrote:
>> On 12/05/2012 06:08 AM, Joel Sherrill wrote:
>>> Code is still printed and unless you enjoy small fonts and reviewing
>>> printouts in landscape mode, it is a reasonable requirement.
>>>
>>> One could technically write code with no line breaks at all but that
>>> would be unpleasant. :-)
>> Provided what you write below, it's what you really should do.
>>
>>> FWIW I am on an Open Group effort and all code examples, prototypes,
>>> etc in the document have to be less than about 76 columns to print as
>>> expected in the standard. 80 is generally a good for when printing.
>> sigh, nowadays, probably all printing SW can handle this as part of the
>> printing preparation process.
>
> ...which doesn't really make the code more readable. If it is ok that
> the printout has the lines wrapped, why not wrap it from the start? ;-)

Wraps render string editing (sed) /searching (grep) the code difficult

E.g. a grep for "zzz"

#define FOO_BAR xxxx yyy zzz

provides reasonable self-explanatory results, while
a grep for "zzz" on
#define FOO_BAR \
xxxx \
yyy \
zzz

won't.

Ralf




More information about the devel mailing list