mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-18 21:11:02 +01:00
code re-organization, added more commands and more flexible lua api
This commit is contained in:
@@ -2,11 +2,16 @@ function add(a,b)
|
||||
return a + b
|
||||
end
|
||||
|
||||
function test(a)
|
||||
return a
|
||||
end
|
||||
|
||||
function parallelresistance(a,b)
|
||||
return 1.0 / (a * b)
|
||||
end
|
||||
|
||||
function init()
|
||||
RegisterFuncTwoArg("add")
|
||||
RegisterFuncTwoArg("parallelresistance")
|
||||
register("add", 2, "addition")
|
||||
register("test", 1, "test")
|
||||
register("parallelresistance", 2, "parallel resistance")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user