[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: My First Computer
On 10 Feb 2003 12:36:47 +0100, Raymond Wiker <Raymond.Wiker@fast.no>
wrote:
>Anders Carlsson <anders.carlsson@mds.mdh.se> writes:
>
>> pausch@saaf.se (Paul Schlyter) writes:
>>
>> > while( printf("Hello\n"), 1 );
>>
>> I also found out that __ for(;printf("Hello\n");); __ works equally
>> well as the while statement, although both will have a conditional
>> to check for every loop.
>
> for(;;printf("Hello\n"));
>
> --- should get rid of the test, as well...
>
> Anyway, using while() or for() to implement this is silly: C
>*has* goto :-)
>
>> By the way, speaking of readability in computer languages, there is
>> some C implementation of a modem/network data decoding that uses a
>> switch() statement as a piece of spaghetti art, running branches
>> into eachother and stuff. I saw a few years ago, can't recall how
>> it worked but it was non-trivial to follow.
>
> Hum. "Duff's Device", I think?
Well, let's add Logo, why don't we?
TO HELLO
PRINT [Hello]
HELLO
END