将源程序打印为输出 [英] To Print the source program as output

查看:77
本文介绍了将源程序打印为输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何打印完整的源程序作为程序的输出?

How to Print the complete source program as output of the program?

推荐答案

vi ************ @ gmail.com 写道:

如何打印完整的源程序作为程序的输出?
How to Print the complete source program as output of the program?



请谷歌搜索自我打印程序。

解决这个问题很有趣,但是IIRC,它没有任何便携式解决方案。


V

-

请在通过电子邮件回复时删除资金''A'

我没有回复最热门的回复,请不要问

Please google for "self-printing program". It is a fun problem to
solve, but IIRC, it doesn''t have any portable solution.

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask




Victor Bazarov< v。******** @ comAcast.netwrote

< ; f8 ********** @ news.datemas.de>:

Victor Bazarov <v.********@comAcast.netwrote in
<f8**********@news.datemas.de>:
vi ************ @ gmail.com 写道:

>如何打印完整的源程序作为程序的输出?
>How to Print the complete source program as output of
the program?



请谷歌搜索自我打印程序。


Please google for "self-printing program".



或者,更好的是,quine。

Or, better yet, "quine".


这是一个有趣的问题需要解决,但是IIRC,它没有任何便携式解决方案。
It is a fun problem to solve, but IIRC, it doesn''t have
any portable solution.



为什么不呢?我错过了什么?一些C ++ quines我已经在几分钟的谷歌搜索中发现了(例如,一个David

Rogers''在Gary Thompson的页面上)似乎很容易

适合标准兼容并且相当便携。


-

....乐趣与

相比,服从是非常瘦的,听到腐烂的西红柿在

后端击中某人的乐趣。 - Garrison Keillor

Why not? What am I missing? Some of the C++ quines I''ve
found in a couple of minutes of googling (e.g., a David
Rogers'' one on Gary Thompson''s page) seem to be easily
adapted to be standard-compliant and reasonably portable.

--
....the pleasure of obedience is pretty thin compared with
the pleasure of hearing a rotten tomato hit someone in the
rear end. -- Garrison Keillor


Pavel Lepin写道:
Pavel Lepin wrote:

Victor Bazarov< v。***** ***@comAcast.net写道

< f8 ********** @ news.datemas.de>:
Victor Bazarov <v.********@comAcast.netwrote in
<f8**********@news.datemas.de>:

> vi ************ @ gmail.com 写道:

>>如何打印完整的源程序作为程序的输出?
>>How to Print the complete source program as output of
the program?


请谷歌搜索自我打印程序。


Please google for "self-printing program".



或者,更好的是,quine。


Or, better yet, "quine".


>这是一个有趣的问题解决,但IIRC,它没有任何便携式解决方案。
>It is a fun problem to solve, but IIRC, it doesn''t have
any portable solution.



为什么不呢?我错过了什么?一些C ++ quines我已经在几分钟的谷歌搜索中发现了(例如,一个David

Rogers''在Gary Thompson的页面上)似乎很容易

适合标准兼容并且相当便携。


Why not? What am I missing? Some of the C++ quines I''ve
found in a couple of minutes of googling (e.g., a David
Rogers'' one on Gary Thompson''s page) seem to be easily
adapted to be standard-compliant and reasonably portable.



大多数都涉及ASCII编码。这不便携。


V

-

请在回复时删除资金''A'电子邮件

我没有回复最热门的回复,请不要问

Most of them involve ASCII coding. That''s not portable.

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


这篇关于将源程序打印为输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆