Main Menu

PSA

Started by Grauniad, December 19, 2012, 06:19:19 PM

Previous topic - Next topic

Grauniad

PSA
The most recent blog post revealed CRPL Towers - programmable in a stack oriented language.

For most people here, stack-oriented languages are unfamiliar.

If you want to whet your whistle, you may want to try programming in a different stack-oriented language such as Forth. Fortunately, there is a browser-based Forth interpreter here: http://forthfreak.net/jsforth80x25.html

Have fun and don't expect any help from anyone.
A goodnight to all and to all a good night - Goodnight Moon

Tiuipuv

Thanks for the link. I was a little bothered by how I couldn't interpret some of what virgil did, it will be time to fix that now I hope  :)
What?! Why? How? Just work, you field!

Grauniad

You are welcome. THe thing to bear in mind is that it's called RPL (Reverse Polish Notation) for a reason. It looks backwards to most everybody.

For instance, to add two numbers, the CRPL code is

2 3 add

On the web site I linked to above, if you want to test this, type

2 3 + .s

the .s displays what is on the stack.  Without that, there is just an "OK." response.

Note that the "." (period) after the OK denotes the number of items on the stack. So if you type

2 3 4 5
the response will be

OK....
A goodnight to all and to all a good night - Goodnight Moon