Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!uakari.primate.wisc.edu!sdd.hp.com!ucsd!ucbvax!bloom-beacon!mintaka!snorkelwacker.mit.edu!ira.uka.de!smurf!flatlin!chumly!wasp From: wasp@chumly.ka.sub.org (Walter Mildenberger) Newsgroups: comp.sys.amiga.programmer Subject: Re: How are some programs SO DAMN SMALL! Message-ID: <1892f496.ARN2606@chumly.ka.sub.org> Date: 24 Jan 91 18:20:54 GMT References: <1991Jan20.210328.18087@hoss.unl.edu> Organization: *private Amiga site* Lines: 33 In article , Leonard Norrgard writes: |In article <1991Jan20.210328.18087@hoss.unl.edu> 231b3678@fergvax.unl.edu (CS 231 section 2) writes: program A : | #include | main(){printf("hey man!\n");} | | the result is 4424 bytes, OPTIMIZED and all. How can a HUGE clock compile | smaller then a printf statement. | [...] |Try this: program B: | | main(){Write(Output(),"Hey man!\n",9);} | |The result should be much smaller. However, since you do not use stdio |in the program (Write() is not stdio) you can use the lattice |_tinymain instead. See the library manual, page L264 for usage. Well, this is right, but create an icon and attach it to the programs, then start the programs from Workbench: while program A works right, b will cause a guru : NOW you know why using "normal" C , not counting on the last byte ;-) Regards -- Walter Mildenberger, Morgenstr. 55, W-7500 Karlsruhe 1, FRG SubNet: wasp@chumly.ka.sub.org ****** Voice: +49 721 385090 * Disclaimer: nobody cares 'bout what I say, so what ?!? **