Miscellaneous

identifyexecutor

Returns two strings: the executor name followed by the executor version.

语法

identifyexecutor(): string | string

返回值

名称类型描述
executorNamestringExecutor name string.
executorVersionstringExecutor version string.

说明

Returns two strings: the executor name followed by the executor version.

无需参数即可调用。函数会从当前 runtime 状态读取所需上下文。

返回 executorName (string), executorVersion (string)。使用返回表区分成功值、nil 结果和可恢复错误。

示例

Read Real's executor name and version as two return values.

local name, version = identifyexecutor()
print(name, version)