473,320 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 1904
"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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.