An example HQ9+ program would be: "HHQ+HQ++"
This program would output "Hello, world! Hello, world! HHQ+HQ++ Hello, world! HHQ+HQ++" as well as incrementing the accumulator three times.
Of course, HQ9+ is a joke; each command represents a common task that beginners are given when learning a new programming language. A common exercise, for example, is to write a computer program that prints "Hello, world!". There are some programming languages in which this is actually quite difficult; however, in HQ9+ the task is elementary, since the program "H" will accomplish the task.
Search Encyclopedia
|
Featured Article
|