Here's "irb" in the Terminal:
irb(main):001:0> x = 7
=> 7
irb(main):002:0> 4 * x
=> 28
Here's RubyCalc:
>> x = 7
=> 7
>> 4 * x
=> -:1: undefined local variable or method `x' for main:Object (NameError)
See? RubyCalc doesn't remember variable values. So if I wanted to use Ruby as a calculator, why wouldn't I just use "irb" in the Terminal?
does not maintain state - emaNneercS
Hello,This is interesting. For my personal use, I do not need to maintain state; actually, RubyCalc is not designed to be a replacement for the IRB, it just aims at being a little calculator easily reachable (does not need to launch a terminal).
However, you're right : it would be better anyway.
For the RubyCalc app, this is rather easy. I will certainly have more problems to make it work with the widget, but I will try.
Thanks for your comment,
Pierre Chatelier
Reply to This
Monday, April 14 2008 @ 04:15 AM PDT