 |
 |
|
 |
|
 |
|  |
|  |
|
 |
From: Orchid XP v8
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 11:50:31
Message: <4a994e47@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Warp wrote:
> Orchid XP v8 <voi### [at] dev null> wrote:
>> I found a program (I forget what it did) that was runnable in multiple
>> languages simultaneously...
>
> A polyglot quine?
Sounds suspicously familiar, yes.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 12:56:38
Message: <4a995dc6$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Warp wrote:
> triple_r <nomail@nomail> wrote:
>> cp smr.c smr
>> chmod +x smr
> That's not C.
Are you sure? (Serious question...)
--
Darren New, San Diego CA, USA (PST)
Understanding the structure of the universe
via religion is like understanding the
structure of computers via Tron.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 13:27:48
Message: <4a996514@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Warp wrote:
>> triple_r <nomail@nomail> wrote:
>>> cp smr.c smr
>>> chmod +x smr
>
>> That's not C.
>
> Are you sure? (Serious question...)
To clarify, I recognise it's not a full C program, as it's missing main. I
just wonder if it's actually an invalid source file.
--
Darren New, San Diego CA, USA (PST)
Understanding the structure of the universe
via religion is like understanding the
structure of computers via Tron.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 13:47:12
Message: <4a99699f@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Darren New wrote:
> > Warp wrote:
> >> triple_r <nomail@nomail> wrote:
> >>> cp smr.c smr
> >>> chmod +x smr
> >
> >> That's not C.
> >
> > Are you sure? (Serious question...)
> To clarify, I recognise it's not a full C program, as it's missing main. I
> just wonder if it's actually an invalid source file.
It's not a complete C program. AFAIK the C standard requires for main()
to exist.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:14:06
Message: <4a996fee$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> Darren New wrote:
>>> Warp wrote:
>>>> triple_r <nomail@nomail> wrote:
>>>>> cp smr.c smr
>>>>> chmod +x smr
>>>> That's not C.
>>> Are you sure? (Serious question...)
>
>> To clarify, I recognise it's not a full C program, as it's missing main. I
>> just wonder if it's actually an invalid source file.
>
> It's not a complete C program. AFAIK the C standard requires for main()
> to exist.
Hence my clarification. It's obviously a valid .h file. But is it a valid .c
file?
--
Darren New, San Diego CA, USA (PST)
Understanding the structure of the universe
via religion is like understanding the
structure of computers via Tron.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:20:56
Message: <4a997187@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Hence my clarification. It's obviously a valid .h file. But is it a valid .c
> file?
According to gcc, no (although it does compile it nevertheless):
> touch test.c
> ls -l
total 0
-rw-r--r-- 1 warp users 0 2009-08-29 21:18 test.c
> gcc -pedantic -c test.c
test.c:1: warning: ISO C forbids an empty source file
warp@a8:~/tmp/hops>ls -l
total 4
-rw-r--r-- 1 warp users 0 2009-08-29 21:18 test.c
-rw-r--r-- 1 warp users 684 2009-08-29 21:18 test.o
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:21:17
Message: <4a99719d@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On Sat, 29 Aug 2009 11:14:01 -0700, Darren New wrote:
> Hence my clarification. It's obviously a valid .h file. But is it a
> valid .c file?
Yes, it would be a valid .c file because a library doesn't need to have a
main() function.
I also seem to recall that there is a way to specify a different entry
point rather than main() even for a program, but whether the .c file is
valid and whether it makes a valid "program" are actually two different
questions. :-)
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:22:40
Message: <4a9971f0@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Jim Henderson <nos### [at] nospam com> wrote:
> Yes, it would be a valid .c file because a library doesn't need to have a
> main() function.
Have you checked that the C standard agrees with you?
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:42:57
Message: <4a9976b1$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:
> Jim Henderson <nos### [at] nospam com> wrote:
>> Yes, it would be a valid .c file because a library doesn't need to have
>> a main() function.
>
> Have you checked that the C standard agrees with you?
I researched a little bit, yes. By definition, a library is not a
program, just a collection of functions, and as such, a main function is
not required (in fact, it could cause problems to have a library with a
main() function).
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:43:36
Message: <4a9976d8@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:
> Jim Henderson <nos### [at] nospam com> wrote:
>> Yes, it would be a valid .c file because a library doesn't need to have
>> a main() function.
>
> Have you checked that the C standard agrees with you?
Windows programs also don't include a main() function - their entry is
WinMain() IIRC.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |