Wren Plugin for Xojo

VM.Interpret Method

Interprets Wren script.

Interpret(
   moduleName as String,
   script as String) as EinhugurWren.InterpretResult

Parameters

moduleName
Name of the module.
script
Script to be executed.

Returns

EinhugurWren.InterpretResult

Remarks


using EinhugurWren

// Both parameters in the Configuration constructor are optional
var conf as new Configuration(addressof WriteCallback, addressof ErrorCallback)
var vm as new VM(conf)

var result as InterpretResult = vm.Interpret("main", "System.print(""I am running in a VM!"")")

if result = InterpretResult.SUCCESS then
    MessageBox("Success")
end if

See Also

VM Class