Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
print/sleep/call 等系统函数
FunctionSystem
print
print(value)
error
error(value)
print("Hello Fluxon") # => 在控制台打印 Hello Fluxon\n error("something wrong") # => 在错误输出打印一行信息
sleep
sleep(ms)
print("before") sleep(1000) # 约 1 秒 print("after")
forName
forName(className)
call
call(func)
call(func, args)
new
static
# 通过名称调用已注册函数 call("print", ["hello from call"]) # 等价于 print("hello from call")
this
this()
target
::
env
env()
Environment
# this() 在上下文调用中获取目标对象 "hello" :: { target = this() # => "hello" print(&target) } # env() 获取当前环境 currentEnv = env()
env()::localVariables()
env()::localVariableNames()
x = 1 y = 2 names = env() :: localVariableNames() # => ["x", "y", ...] values = env() :: localVariables() # => [1, 2, ...]
throw
throw(error)
if &x < 0 { throw("x must be non-negative") }