472,983 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

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 1881
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: D. Alvarado | last post by:
Hello, Does anyone have a PHP 4 one-liner (or two-liner) for extracing a file from a directory in which I know the word "footer" is guaranteed to be in the file name, I know the precise directory...
8
by: Paul Watson | last post by:
Can a for loop be used in a one-liner? What am I missing? $ python -c "import sys;print ''.join()," now is the time now is the time $ python -c "import sys;for line in...
4
by: Neal Becker | last post by:
I can do this with a generator: def integers(): x = 1 while (True): yield x x += 1 for i in integers():
0
by: Xah Lee | last post by:
One-Liner Loop in Functional Style Xah Lee, 200510 Today we show a example of a loop done as a one-liner of Functional Programing style. Suppose you have a list of file full paths of...
8
by: Mantorok Redgormor | last post by:
The only adder I was able to come up with for incrementing by one, uses a for loop. I was trying to do this without using a for loop while emulating i++(it's for obfuscated code) Anyone know...
5
by: g.kanaka.raju | last post by:
main() { printf(&unix, (unix)+"fun"-0x60);} output : unix I have printed &unix ==> output : %six and (unix)+"fun"-0x60 ==> output : un Could anyone of you explain how the above works....
9
by: jl_post | last post by:
Hi, A few months back I remember reading through C++ newsgroups trying to find a way to quickly convert a number to a C++ std::string. I often see code like: // Create a string that holds a...
3
by: srinivasan srinivas | last post by:
Hi, Do we have python one-liner like perl one-liner 'perl -e'?? Thanks, Srini Unlimited freedom, unlimited storage. Get it now,...
37
by: c.lang.myself | last post by:
Can you determine output of following one liner by visual inspection.. It had won an award in obfuscated C contest..... main() { printf(&unix,(unix)+"fun"-0×60);} You can also list your...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.