I’m trying to simply add 200 to index, but am getting the error:
“initialize': undefined method
+’ for #<NumNode:0x82537b4 @num=2>
(NoMethodError)”
Any thoughts on how I can fix this?
class StoreNode < UnaryNode
def initialize(subTree, index)
super(subTree)
@theIndex = index + 200
end
def evaluate()
i = @subTree.evaluate()
$calc.out.write(“M[”)
$calc.out.write(@theIndex)
$calc.out.write("]:= M[sp + 0]\n")
end
end