if you think otherwise you're a trendfag. goto is far more efficient than function calls for short blocks of code (lol compiler ignoring inline) and have a lot of neat applications.
Name:
Anonymous2012-06-12 16:00
>>40
yes it does, but can you do it without checking for "FizzBuzz" explicitly? also without a helper variable?
Name:
Anonymous2012-06-12 16:18
void fizzbuzz(int end){
int i;
for(i = 3; i < end; i += 3)
printf("Fizz\n");
for(i = 5; i < end; i += 5)
if(i % 3)
printf("Buzz\n");
else
printf("FizzBuzz\n");
}
for(size_t i = 0; i < upto; ++i) printf(text[i%15], i);
}
hai gaiz cna i play wit u?
Name:
Anonymous2012-06-12 22:39
thinks using gotos for simple control flow is faster than using built in syntax for equivalent control flow
there are times to use goto, but this is not one of them. I love the art of goto programming as much as anyone, but don't act like any of this is actually useful for anything other than fun.
>>48
there is a transformation. while is all you need for any control flow, although extra variables may need to be introduced. tail calls and if can be trivially compiled to a convoluted bundle of gotos, with no additional resources as well. Any arbitrary block of goto code can be translated to a set of functions that transfer control to one another with tail calls.