Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:I assume you can use __FILE__ with #embed? (I can do that with my version of it).
On 02/06/2024 23:17, Ben Bacarisse wrote:The program isn't running at compile time.Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:>
>Writing a prgram which writes its own source to standard output is aA quine must also not process any input.
standard programming problem. It's called a quine.
No input at compile-time or runtime?
A compiler necessarily has to have the source code of the program as input,The compiler can do what it likes!
so what are the limitations?
A C program can use #include; does that extendThere's nothing wrong with using either, but a C quine that uses #embed
to directives like #embed, or is that considered cheating?
relies on knowing the name of the file in which it is stored.
It is aNot really. I've just added this line:
"fixed point of the execution environment", but it's probably the least
interesting C quine possible -- much like
1
is a quine in languages that evaluate and print an expression.
Les messages affichés proviennent d'usenet.