[comp.os.msdos.misc] MY SCREWUP.. ok ok ok... get off it dudes

matelgar@nmsu.edu (Marek Telgarsky) (06/24/91)

\Im SORRY this my .sig file was screwed up.. and hope nobody went into
epileptic seisures over it. I changed it so that it just writes Hello
World! on the screen .. The most basic of C programs.. ok? 
			Marek

ps-phew... people get so worked up over a .. 

/***********************************************************************/
main() {			/* matelgar@dante.nmsu.edu */
  printf("Hello World!\n");	
}

roy%cybrspc@cs.umn.edu (Roy M. Silvernail) (06/24/91)

matelgar@nmsu.edu (Marek Telgarsky) writes:

> I changed it so that it just writes Hello
> World! on the screen .. The most basic of C programs.. ok? 
> /***********************************************************************/
> main() {			/* matelgar@dante.nmsu.edu */
>   printf("Hello World!\n");	
> }

Methinks you left out something quite important, though...

#include <stdio.h>
--
    Roy M. Silvernail   | #include <stdio.h>                 | Long live
 roy%cybrspc@cs.umn.edu | main(){                            | C programs
 cybrspc!roy@cs.umn.edu |  float x=1;                        | in .sig
roy@cybrspc.uucp(maybe!)|  printf("Just my $%.2f.\n",x/50);} | files! -- me

valley@gsbsun.uchicago.edu (Doug Dougherty) (06/24/91)

roy%cybrspc@cs.umn.edu (Roy M. Silvernail) writes:

>matelgar@nmsu.edu (Marek Telgarsky) writes:

>> I changed it so that it just writes Hello
>> World! on the screen .. The most basic of C programs.. ok? 
>> /***********************************************************************/
>> main() {			/* matelgar@dante.nmsu.edu */
>>   printf("Hello World!\n");	
>> }

>Methinks you left out something quite important, though...

>#include <stdio.h>
^^^^^^^^^^^^^^^^^^^

What makes you think you need that?
Methinks you are someone who is doing *training* for C coding, not
someone who is actually doing C coding.
--

	(Another fine mess brought to you by valley@gsbsun.uchicago.edu)

glenn@welch.jhu.edu (Glenn M. Mason) (06/24/91)

In article <1991Jun24.091147.29839@midway.uchicago.edu> valley@gsbsun.uchicago.edu (Doug Dougherty) writes:
>roy%cybrspc@cs.umn.edu (Roy M. Silvernail) writes:
>
>>matelgar@nmsu.edu (Marek Telgarsky) writes:
>
>>> I changed it so that it just writes Hello
>>> World! on the screen .. The most basic of C programs.. ok? 
>>> /***********************************************************************/
>>> main() {			/* matelgar@dante.nmsu.edu */
>>>   printf("Hello World!\n");	
>>> }

;^)

--
#include <std.disclaimer>	/* question of the day boys 'n girls ...    */
main(argc,argv)			/* is this RECURSION or is it ITERATION?    */
int argc; char *argv[];		/* ... or is it a hokey C program embedded  */
{				/* within a .sig file with the sole intent  */
        int i = atoi(argv[1]);	/* of propagating a rash of useless follow- */
	char buf[20];		/* up postings?  ;^)                        */
        printf("For the %d%s time, ENOUGH ALREADY!!\n",i,
                (i%100==11||i%100==12||i%100==13)?"th":((i%10==3)?"rd":
                ((i%10==2)?"nd":((i%10==1)?"st":"th"))));
        execl(argv[0],argv[0],sprintf(buf,"%d",i+1),0);
}

s902114@minyos.xx.rmit.oz.au (Zen [Stuart Bishop]=) (06/24/91)

matelgar@nmsu.edu (Marek Telgarsky) writes:

:)/***********************************************************************/
:)main() {			/* matelgar@dante.nmsu.edu */
:)  printf("Hello World!\n");	
:)}

I always liked the version I ripped out of someone else's .sig file:


main(){int ll,L1,l0,hl,q,h1,h;for(putchar(putchar((h=7)*10+2)+29);l0?putchar(l0):!hl;putchar(ll),L1==2?ll=32:0){L1++==0?(ll=l0=54<<1):ll=='l'&&L1<3?(ll+=1L|1L<<
1L,l0=0):L1==sizeof L1&&ll==32?(ll=19+h1):(q-=h1);L1==5?ll-=8:q&&&hl;L1==sizeof ll+2?(ll+=3):1L;ll==(h<<4)+2&&L1!=6?(ll=ll-6):(h1=100L);L1!=1L<<3?q--:(hl=ll=h1);}printf("\n");}


:-)


-- 


 _____                      Two elephants fell off a cliff. Boom Boom.
//  //    __                                                             //
   //    /  \   I\ I                    for a good time call            //
  //    (--     I \I  alias              s902114@minyos.xx.rmit.oz.au  //
 //      \__/   I  I   Stuart Bishop   or    zen@phoenix.pub.uu.oz.au //
((___________________________________________________________________//
-- 


 _____                      Two elephants fell off a cliff. Boom Boom.
//  //    __                                                             //

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (06/25/91)

  There's a missing comma, too.
-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
  GE Corp R&D Center, Information Systems Operation, tech support group
  Moderator comp.binaries.ibm.pc and 386-users digest.

kej@smunews.UUCP (Keith Jackson) (06/27/91)

In article <1991Jun24.091147.29839@midway.uchicago.edu> valley@gsbsun.uchicago.edu (Doug Dougherty) writes:
>roy%cybrspc@cs.umn.edu (Roy M. Silvernail) writes:

>>matelgar@nmsu.edu (Marek Telgarsky) writes:

>>> I changed it so that it just writes Hello
>>> World! on the screen .. The most basic of C programs.. ok? 
>>> /***********************************************************************/
>>> main() {			/* matelgar@dante.nmsu.edu */
>>>   printf("Hello World!\n");	
>>> }

Not the most basic (see example below...)

>>Methinks you left out something quite important, though...

>>#include <stdio.h>
>^^^^^^^^^^^^^^^^^^^

>What makes you think you need that?
>Methinks you are someone who is doing *training* for C coding, not
>someone who is actually doing C coding.

You technically _don't_ need the #include, BUT, it's VERY good programming
practice.  Helps to avoid calling convention problems (for ANSI and later)
plus, gives you access to #defines (like NULL for example!), structs,
typdefs, extern variables, etc.  Anyone who want's to do a good job of C
coding will include the appropriate header files to be safe.  The only
thing you gain by omitting them is compile time.

Now, the most simple C program is:

main(){write(1,"hello, world!\n",14);}

This requires the least amount of linking and produces the same result.  Of
course, one has to count the number of characters in the string, but at
least you save the computer from having to do such an arduous task. :-)

  -*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-*^*-
		Keith Jackson == jackson@csvax.seas.smu.edu

                          UN*X - live free or die