The Museum of HP Calculators

HP Forum Archive 20

[ Return to Index | Top of Index ]

GolfScript versus RPL
Message #1 Posted by Allen on 9 Feb 2011, 8:00 p.m.

I've been reading up on a fairly new programming language called Golf Script Since it's stack based, it reads very much like RPL.

Curious if anyone here has experience in this language??

For example, the coercion behaviors from the tutorial are nearly identical to the way the HP48/49/50 treat similar inputs.

GOLFSCRIPT
 1[2]+ -> [1 2]
 1'2'+ -> "12"
 1{2}+ -> {1 2}

And the first example in the tutorial, is notably post-fix

Example:

1 1+

Has 3 items, "1", "1", "+". The ones push the number 1 onto the stack. The + is a built-in block defined to take the top two stack items, add them together, and push the result on the stack.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall