func doOperation(_data) fvar(s) s = '(Eval(' + Op1 + ') ' + OpType + ' Eval(' + Op2 + '))' if(not isset(_math_)) var(_math_) end if(linked(Result)) println(res, ' = ', s) event(onResult, res) else event(onResult, s) end end func doClear() print(res, ' = ', Default) end func Result() if(linked(doOperation) or linked(doClear)) if(not isset(_math_)) var(_math_) stack &= block.select((isset(BLK_FUNC) and isndef(Extern)) ? BLK_FUNC : BLK_GLOB) println('Dim ', res) println(res, ' = ', Default) block.select(_arr.pop(stack)) end return(res) else return('(Eval(' + Op1 + ') ' + OpType + ' Eval(' + Op2 + '))') end end // todo: // сделать оптимизацию для случая, когда Op1 соединен с Result