468,290 Members | 1,940 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,290 developers. It's quick & easy.

Re: C ONE LINER

In article <gg**********@aioe.orgAndrey Tarasevich <an**************@hotmail.comwrites:
....
I got it from here

http://www.di-mgt.com.au/src/korn_ioccc.txt

I have to admit that haven't noticed that this is not really IOCCC web
site at all. Quite possibly the explanation given at that page is
incorrect.
That explanation is bogus. Originally you could omit the *type* from
the declaration (it defaulted to int) but you could not omit the complete
declaration, moreover, there should also be a keyword that made it appear
as a declaration. So:
auto unix;
was allowed (it defaulted to int), but plain:
unix;
not, and complete omission also not.

And by the time of that IOCCC omitting the type was also no longer allowed.
It seemed pretty authentic to me and it made sense, at least
at the first sight. Now I wonder if this can actually work, given the
right OS.
The program as given (with "int unix;" added) did indeed work with Unix
on the VAX.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Nov 20 '08 #1
1 1646
"Dik T. Winter" <Di********@cwi.nlwrites:
In article <gg**********@aioe.orgAndrey Tarasevich
<an**************@hotmail.comwrites:
...
I got it from here
>
http://www.di-mgt.com.au/src/korn_ioccc.txt
>
I have to admit that haven't noticed that this is not really IOCCC web
site at all. Quite possibly the explanation given at that page is
incorrect.

That explanation is bogus. Originally you could omit the *type* from
the declaration (it defaulted to int) but you could not omit the complete
declaration, moreover, there should also be a keyword that made it appear
as a declaration. So:
auto unix;
was allowed (it defaulted to int), but plain:
unix;
not, and complete omission also not.
Agreed.
And by the time of that IOCCC omitting the type was also no longer allowed.
In 1987, there was no C standard, and I suspect most compilers allowed
"auto unix;" (unless they pre-defined "unix" as a macro, of course).

[...]

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Nov 20 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by D. Alvarado | last post: by
8 posts views Thread by Paul Watson | last post: by
4 posts views Thread by Neal Becker | last post: by
reply views Thread by Xah Lee | last post: by
8 posts views Thread by Mantorok Redgormor | last post: by
5 posts views Thread by g.kanaka.raju | last post: by
9 posts views Thread by jl_post | last post: by
3 posts views Thread by srinivasan srinivas | last post: by
37 posts views Thread by c.lang.myself | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.