Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hello World

Author: Dieter Buerssner

Date: 10:39:33 07/31/03

Go up one level in this thread


On July 31, 2003 at 12:38:51, Omid David Tabibi wrote:

>On July 31, 2003 at 11:25:58, Robert Hyatt wrote:
>
>>On July 30, 2003 at 11:16:30, Omid David Tabibi wrote:
>>
>>>On July 30, 2003 at 09:29:50, Tony Werten wrote:
>>>
>>>>On July 30, 2003 at 06:29:43, Omid David Tabibi wrote:
>>>>
>>>>>float o=0.075,h=1.5,T,r,O,l,I;int _,L=80,s=3200;main(){for(;s%L||
>>>>>(h-=o,T= -2),s;4 -(r=O*O)<(l=I*I)|++ _==L&&write(1,(--s%L?_<(L)?--_
>>>>>%6:6:7)+"World! \n",1)&&(O=I=l=_=r=0,T+=o /2))O=I*2*O+h,I=l+T-r;}
>>>>
>>>>
>>>>You've given a good reason not to use C :)
>>>
>>>Not to use C? Just #include <io.h> and you have the above program as C++ !
>>>
>>>BTW, I used to use the above three lines of code as my email signature for a
>>>while :)
>>>
>>>
>>>>
>>>>Tony
>>
>>
>>Note that it won't work on all machines.  :)
>>
>>I'll tell you why if you are interested.
>
>Not that I fully understand how it works, but I'd be interested to know why it
>wouldn't work on all machines...

Don't know what Bob was thinking.
write is no Standard C or C++ function (io.h is no standard header, either).
Even on platforms that support write, the printing of "\n" may only be a visual
linefeed (without carrige return).

Many of the IOCCC programs are a bit on the Unix side, and not totally portable.

Regards,
Dieter



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.