scot@ncrcae.Columbia.NCR.COM (Scot Wingo) (06/01/89)
Recently I have been keeping a log of "silly" c code, that I and friends have come up with. For example: char broiled; double troube; etc..... Does anybody have any good contributions? Scot Wingo Disclaimer: I'm silly not C !!
wht@tridom.uucp (Warren Tucker) (06/03/89)
In article <4530@ncrcae.Columbia.NCR.COM>, scot@ncrcae.Columbia.NCR.COM (Scot Wingo) writes: > > char broiled; > double troube; long dong; unsigned letter; signed Warren; -- ------------------------------------------------------------------- Warren Tucker, Tridom Corporation ...!gatech!emory!tridom!wht Sforzando (It., sfohr-tsahn'-doh). A direction to perform the tone or chord with special stress, or marked and sudden emphasis.
vijay@bradley.UUCP (06/05/89)
Scott Wingo from scot@ncrcae.Columbia.NCR.COM writes : >Recently I have been keeping a log of "silly" c code, that I and friends have come up with. For example: > >char broiled; >double troube; > > >etc..... > >Does anybody have any good contributions? [Rest Deleted...] A silly C program, here it is : --------SILLY C CODE THAT WORKS (AT LEAST ON MY MACHINE)----- typedef short some; /* some things are short */ typedef some very; /* some things are very short */ #define A /* The first letter of the English Alphabet */ #define LINE 2 /* 2 points define a line */ #define TRUTH BEAUTY /* truth is beauty */ #define BEAUTY 10 /* and beauty is a 10 */ #define bad char /* burnt on both sides */ #define old char /* the great Chicago Fire */ #define get strlen /* during your life, try to get some sterling */ #define youmake float /* you make it, I'll drink it */ #define yourgoals in terms you can understand /* #include "yourdreams" /* for the future */ /* everyone needs goals */ short term; double yourpleasure(); double yourfun; long Term, play(), agame; /* everyone needs diversions */ old *joke = "Why did the chicken cross the road?\n\tTo get to the other side!\n\t\tWocka Wocka Wocka!\n"; tell(joke) bad *joke; /* wait- you haven't heard it yet! */ { short laugh; /* please */ laugh = get(joke); write(1, joke, laugh); /* write it down- don't say it */ } /* most folks like music */ long play(record) long record; { very pleasant = TRUTH; /* if you like music */ while (record == pleasant) play(record--); return( pleasant ); /* music soothes the savage */ } double yourpleasure(one, way) /* this is necessary if */ some one; /* is watching ,or if you have a */ long way; /* to go */ { /* this can change one while maintaining one's identity */ one = one * one; return( one ); /* after all, it should have at least doubled */ } hold(temper) /* good advice */ A short temper; /* is a dangerous thing */ { A long time; /* is what you need */ very calm; /* is how you should be */ calm = temper, temper; while (calm--) wait(&time); return(calm); /* if possible */ } /* now, on to the main thing */ main(thing, mustbe) /* to balance work, play, and goals */ some thing, mustbe; /* important, or we wouldn't be here */ { long time(); /* know C */ very bored; /* the result of too few goals */ short hours; /* make */ long yourwork; /* which makes for */ short tempers; /* which can be improved by */ long laughing; /* first, set priorities */ yourwork = 0; yourfun = 1.0e+38; if (yourpleasure( mustbe, yourwork )) yourfun = yourwork; else yourfun = play( agame ); bored = yourfun - yourwork; /* nothing to do? */ /* reach out and touch someone! */ switch ( bored ) { /* connects all of this together */ default: hours = hold(LINE); /* no way to avoid it, take a */ break; } /* take a music break */ while ( thing-- ) { /* you make my heart sing */ youmake everything; very groovy; } /* focus on what is important to you */ while ( yourfun < 0 ) { yourpleasure( mustbe, agame); yourfun = play( agame ); } tell(joke); exit( laughing ); } Was that good or what........ =============================================================I / / E-mail: vijay@bradley.edu I / / * * ___ ...!uiucdcs!bradley!vijay I / / / / / / / / I===================================I //___/___/__/_\/__/__/ I "A duck walks in a drug store and / / I says. 'Give me a chapstick, and / / I put it on my bill!'" __/ __/ I - Judge Harry Stone, Night Court ===============================================================
diamond@diamond.csl.sony.junet (Norman Diamond) (06/05/89)
In article <4530@ncrcae.Columbia.NCR.COM>, scot@ncrcae.Columbia.NCR.COM (Scot Wingo) writes: >> char broiled; >> double troube; In article <121@tridom.uucp> wht@tridom.uucp (Warren Tucker) writes: >long dong; >unsigned letter; >signed Warren; short note; void *cheque; static emi; extern upbringing; typedef and_dumb; { yourself; auto cry; auto laugh; auto signed my; auto graph; -- Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.co.jp@relay.cs.net) The above opinions are my own. | Why are programmers criticized for If they're also your opinions, | re-implementing the wheel, when car you're infringing my copyright. | manufacturers are praised for it?
klash@bmerh202.UUCP (Karl Klashinsky) (06/12/89)
This is a humourous program to run through lint -- a friend gave it to me, I don't know where she got it, but someone seems to be getting credit for it. PS: The version of lint on my HP 9000/360 doesn't do this program justice, but the Sun version of lint does (or did -- Sun 3.5). ---8<--------------- /* human.c -- run lint on this file. (Stolen from Gary Perlman, Wang Institute ) */ #define morals Y #define morals Z extern float allegiance; int principles (); main () { char *principles (); psyche; human (); bowels (); conscience (); moral_sense (); religion (principles ()); marriage (allegiance); } extern float allegiance; human () { int appendix; struct brain {short intelligence; long pride;} brain; marriage (allegiance,principles(),allegiance); return; religion (brain); happiness (); } bowels () { return (1); } conscience () { return (0); } common_sense () { exit (moral_sense ()); } moral_sense () { return (1); } double entendre () {return (entendre ());} religion (based_on_data) {int devil;} Karl Klashinsky "I shall endeavour to Bell-Northern Research, Ltd. function adequately." utgpu!bnr-vpa!bnr-fos!hobbes!klash Lt. Data