The challenge: BASIC program which produce the same on LIST or RUN
|
10-03-2018, 05:21 AM
Post: #1
|
|||
|
|||
The challenge: BASIC program which produce the same on LIST or RUN
One of the best logical/programmer's challenge I can remember, was published in one of the first computer magazines in the country about 3 decades ago, had following short definition (paraphrased):
"Make the shortest BASIC program which produce exactly the same output on RUN or LIST, i.e. the program which list himself. In the program is forbidden to use LIST, PEEK, POKE, USR or similar commands specific for the implementation - it is allowed to use only standard BASIC commands and functions." From today perspective, it looks to me almost naive, even the problem itself is basically not naive at all. I remember I have also applied solution and received some reward for shortest solution based on strings. I remember of this with strong nostalgia - good old pioneers days! Perhaps solution of this challenge may be possible as well on some old HP calculator models have implemented BASIC? Have a nice fun! |
|||
10-03-2018, 07:35 AM
Post: #2
|
|||
|
|||
RE: The challenge: BASIC program which produce the same on LIST or RUN | |||
10-03-2018, 08:07 AM
(This post was last modified: 10-03-2018 10:32 AM by sasa.)
Post: #3
|
|||
|
|||
RE: The challenge: BASIC program which produce the same on LIST or RUN
(10-03-2018 07:35 AM)Thomas Klemm Wrote: Cf. Quine The article is an overkill for valid and short solutions in BASIC. It is forbidden by definition to use LIST inside the program. The solution with files is obvious and valid one. However, there is other two differently based approaches, on what the challenge aims... |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: