Skip to main content

Execute bytecode

Executes previously compiled code

Function ExecuteBytecode(Val Lua, Val Bytecode) Export

ParameterCLI optionTypeRequiredDescription
Lua-ArbitraryLua AddIn or Lua version to run
Bytecode-BinaryDataBytecode to execute
Returns

Arbitrary - Execution result

tip

Parameters with Binary data type can also accept file paths on disk and URLs

Caution

NOCLI: this method is not available in CLI version

1C:Enterprise/OneScript code example
Bytecode = OPI_Lua.CompileCodeFromString("Lua54", "return 11");
Result = OPI_Lua.ExecuteBytecode("Lua54", Bytecode);
Result
11