Content deleted Content added
Stepho-wrs (talk | contribs) →whitespace and compilation: new section |
|||
Line 31:
Recently an anonymous editor changed the whitespace from simple spaces to tabs, claiming "UNIX-style indentation" had to be with tabs, not spaces. I reverted this because a) whitespace in C can be spaces, horizontal tabs, vertical tabs and newlines, b) UNIX-style does not restrict it to tabs only, c) those massive, wide tabs seem un-aesthetic to me (that's a personal thing but the industry seems to like 3 or 4 space indentation) and d) even under flame war discussions, the original indentation was perfectly serviceable. He also claimed that (void) has to be used when the return value of printf() is ignored. It certainly can be used that way but is by no means required. To my mind, this cast gets in the way of this example. A clean, minimal source is preferred so that the topic under discussion is highlighted, without distractions. Lastly, he also added a sample compilation and invocation. This only applies to UNIX and doesn't take into account compilation and invocation under Windows, Macs, cross compilers for embedded systems, etc. This isn't an article on compiling and invoking C programs. For users not used to Unix, they now have to figure what parts of that are the commands, what parts are the prompts and what part is the actual output. Much better to simply show the output and leave it at that. Thoughts? <span style="border:1px solid blue;border-radius:5px;color:blue">[[User:Stepho-wrs|''' Stepho ''']] <span style="font-size:xx-small; vertical-align:top">[[User Talk:Stepho-wrs|talk]] </span></span> 00:18, 11 March 2012 (UTC)
: I agree with all your points. I would add that indentation isn't only a personal thing - Wikipedia prefers consistent style. So I'd support reverting the changes to the indentation too. [[User:1exec1|1exec1]] ([[User talk:1exec1|talk]]) 23:49, 11 March 2012 (UTC)
|