Re:Yahoo Logo ASCII Animation in 462 bytes of C (2011)
by ghayes on Wednesday October 21, 2015 @07:25PM
(#10429544)
Yeah, 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.
[ Parent
| on HN ]
Re:Yahoo Logo ASCII Animation in 462 bytes of C (2011)
by steckerbrett on Wednesday October 21, 2015 @08:04PM
(#10429693)
for(i=0;i<4;i++)
This is three lines?
Re:Yahoo Logo ASCII Animation in 462 bytes of C (2011)
by _lce0 on Wednesday October 21, 2015 @09:26PM
(#10429928)
Actually 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
Re:Yahoo Logo ASCII Animation in 462 bytes of C (2011)
by a1k0n on Thursday October 22, 2015 @01:26AM
(#10430538)
FWIW, 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".
Re:Yahoo Logo ASCII Animation in 462 bytes of C (2011)
by MichaelBurge on Wednesday October 21, 2015 @11:46PM
(#10430292)
Why not? It expands to 2 statements and a statement-expression:
int i = 0;
while (i < 4) {
i++;
}
Re:Yahoo Logo ASCII Animation in 462 bytes of C (2011)
by giancarlostoro on Wednesday October 21, 2015 @08:21PM
(#10429750)
I think he meant outside of for loops in function calls and declarations.