From: Mark Probert Date: 2004-10-01T11:10:00+09:00 Subject: Re: RPN Fun James Edward Gray II wrote: > > If you're one of those people who has fond memories of HP's RPN > calculators, you might want to play with this code a little. Just > thought I would share. > Thank you :-) Also, if you are interested in RPN, I have ported a FORTH to Ruby (just because ;-)). You can find it at http://raa.ruby-lang.org/project/ratlast/ All the RPN features you could want, plus more (ie Full Ruby). Trivial e.g. require 'Atlast' t = Atlast.new t.eval(": sqr ( n -- n*n ) dup * ;") n = t.run("4 sqr .") puts "4*4 = #{n}" Regards, -- -mark. (probertm @ acm dot org)