3 ms·
Yes, I don't see how this isn't > Yahoo Logo ASCII Animation in one line of C (2011) What's the difference between six lines of C and one line of C?
by cryptoz 11y ago
Yes, I don't see how this isn't
> Yahoo Logo ASCII Animation in one line of C (2011)
What's the difference between six lines of C and one line of C?
- deleted 11y ago[deleted]
- rcy 11y ago400 characters? Assuming one line is 80 characters max.
- ghayes 11y agoYeah, I think you have to count a semi-colon as a "line of C" for this to be meaningful. It's still awesome none-the-less.
- steckerbrett 11y agofor(i=0;i<4;i++) This is three lines?
- giancarlostoro 11y agoI think he meant outside of for loops in function calls and declarations.
- _lce0 11y agoActually there are two types of ";", expression-separator (the one you mentioned) and statement-separator (the one parent meant) The problem with using those for code metrics is that many systems don't require separators, like `if`, `for` and friends
- a1k0n 11y agoFWIW, most of this code is actually contained inside for loop expressions, since you can chain them together with commas and get away without using any braces. Once that's done it's hard to even count "lines".
- MichaelBurge 11y agoWhy not? It expands to 2 statements and a statement-expression: int i = 0; while (i < 4) { i++; }