catscript

a programming language. for cats. sorry.

main.meowtab indents
outputwaking tuft up...
loading python into your browser. first time takes a few seconds.

words

cat(x)
print it
pspsps("q? ")
ask the user something
hunt f(x) { }
make a function
bring x
return from a hunt
litter[1, 2, 3]
a list
purr / hiss
true / false
empty_bowl
nothing
for i in 1 to 10 { }
count, both ends included
repeat 3 { }
do it 3 times
try { } pounce e { }
catch an error
knock(x)
knock a variable off the table
size / add / text
length, append, turn into text

when tuft hisses

HISS-100
can't read that character
HISS-200
code is shaped wrong (missing ) or })
HISS-204
nobody answered pspsps
HISS-300
wrong kinds of values (purr + 1)
HISS-403
dog word, or a taken name
HISS-404
that name doesn't exist
HISS-406
wrong number of things passed in
HISS-409
bring outside a hunt
HISS-416
no kitten at that position
HISS-500
divided by zero
HISS-508
chasing its tail (runs forever)