10-03-2018, 05:21 AM
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!
"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!