Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:
On 03/06/2024 10:31, Ben Bacarisse wrote:
I don't know if that is guaranteed by the standard as I've not reallyThere's nothing wrong with using either, but a C quine that uses #embed>
relies on knowing the name of the file in which it is stored.
I assume you can use __FILE__ with #embed? (I can do that with my version
of it).
>
Then it doesn't need to know the actual name of the file.
looked at C23, but if is it, that would be a way to write a (rather
boring) quine in C23.
That it is not very interesting. Using #embed applied to a program's only source code I think opens up some intriguing possibilities.What part are you objecting to?It is a>
"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.
Not really.
That the above (a C quine using #embed)'strinclude' is the equivalent of #embed. It does textual inclusion at compile-time.
in not a fixed point of the execution environment? That it's not an
uninteresting quine? Or that it's not "much like" self-evaluating
expression quines?
You said "not really" in reply to a moderately complex paragraph.
I've just added this line:I think I'm missing your point. That does input at run-time (if my
>
puts(strinclude(__FILE__));
guess about strinclude is correct).
Les messages affichés proviennent d'usenet.