Cactus is a brand new programming language created in June of 1999 by Kevin P. Albrecht. It is an interpreted language designed simply for recreation. Cactus files use the extension .cts and are written using the following procedures.
Writing Cactus programs is very simple. You simply create an ascii text file with the folloing keywords of your choice, one per line. When using mathematical operators, the result will replace the value in the first <variable-name> you supply.
$
<comment text>
name
<program name
new
<integer or decimal>
<variable-name>
grab
<variable-name>
print
<literal or variable-name>
equ
<variable-name> <literal or variable-name>
add
<variable-name> <literal or variable-name>
sub
<variable-name> <literal or variable-name>
mul
<variable-name> <literal or variable-name>
div
<variable-name> <literal or variable-name>
The following are some simple examples to help you get started programming with Cactus.
This program converts a celsius temperature into a fahrenheit temperature.
$ Beginning of Cactus file.
name ctof
new decimal d
grab d
mul d 9.0
div d 5.0
add d 32.0
print d
$ End of Cactus file.
This program converts a fahrenheit temperature into a celsius temperature.
$ Beginning of Cactus file.
name ftoc
new decimal d
grab d
sub d 32.0
mul d 5.0
div d 9.0
print d
$ End of Cactus file.