cal_limits = 11


function cal()
local x1 = we_bas_getdouble("@W_HDW0")
local x2 = we_bas_getdouble("@W_HDW10")
local x3 = we_bas_getdouble("@W_HDW20")
local x4 = we_bas_getdouble("@W_HDW30")

local y1 = we_bas_getdouble("@W_HDW40")
local y2 = we_bas_getdouble("@W_HDW50")
local y3 = we_bas_getdouble("@W_HDW60")
local y4 = we_bas_getdouble("@W_HDW70")

local res1=x1+y1
local res2=x2-y2
local res3=x3*y3
if res~=nil then
    print("multiple result is:"+res3)
end

local res4=x4/y4

we_bas_setdouble("@W_HDW100",res1)
we_bas_setdouble("@W_HDW110",res2)
we_bas_setdouble("@W_HDW130",res3)
we_bas_setdouble("@W_HDW120",res4)
end
