mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-01 19:44:44 +00:00
* fixes #14409; fixes#10674 VM callbacks switch to table-index seqs * fixes package name * reduce runtime cost
This commit is contained in:
@@ -23,7 +23,7 @@ proc initInterpreter(script: string): Interpreter =
|
||||
|
||||
proc main() =
|
||||
let i = initInterpreter("myscript.nim")
|
||||
i.implementRoutine("*", "exposed", "addFloats", proc (a: VmArgs) =
|
||||
i.implementRoutine("nim", "exposed", "addFloats", proc (a: VmArgs) =
|
||||
setResult(a, getFloat(a, 0) + getFloat(a, 1) + getFloat(a, 2))
|
||||
)
|
||||
i.evalScript()
|
||||
|
||||
Reference in New Issue
Block a user