|
I wondered about the postfix minus operator. Didn't you add a semicolon, too? I think this message would be just as readable as the C code sample if I eliminated capital letters and spaces but retained the punctuation marks. It's just that C syntax allows you do do stuff like that or , as my teacher in junior college used to say, "C doesn't care." Whitespace is pretty much for the convenience of humans. <g> > -----Original Message----- > From: Scott Klement [mailto:klemscot@klements.com] > Sent: Wednesday, February 06, 2002 10:54 PM > To: midrange-l@midrange.com > Subject: Re: CREATORS ADMIT C AND UNIX A HOAX! > > > > I believe the problem is the "e-" and "R-". They should > probably be "e--" > and "R--", and someone's e-mail editor somewhere decided it'd > be helpful, > and convert "--" into a longer dash... (I know Word would do that) and > then when it got converted back to plain text, it was just one... > > The following code compiles: > > #include <stdio.h> > void P(const char *); > > main () { > int *u, k, R, e, C; > > for(;P("\n"),R--;P("|"))for(e=C;e--;P("_"+(*u++/8)%2))P("|"+(*u/4)%2); > } > > void P(const char *huh) { > printf("%s", huh); > } > > It certainly doesn't do anything useful, though... and it > crashes pretty > quick, since adding to the pointer returned by "_" and "|" is > a REALLY bad > idea... > > Oh well... I was hoping the code would do something cool like print a > message or something. sigh. > > NOTICE: All e-mail sent to or from this e-mail address will be received or otherwise recorded by The Sharper Image corporate e-mail system and is subject to archival, monitoring, review by and/or disclosure to Sharper Image security and other management. This message is intended only for the use of the addressee and may contain information that is privileged and confidential. If you are not the intended recipient, dissemination of this communication is prohibited.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.