system.l0
Module: std.system
Source: compiler/shared/l0/stdlib/std/system.l0 Language: Dea/L0
Imports / Includes
sys.rt
Symbols
Function exit
1
func exit(code: int) -> void
Exits the program with the given exit code.
Parameters:
code: The integer exit code.
Function env_get
1
func env_get(var_name: string) -> string?
Retrieves the value of the specified environment variable.
Parameters:
var_name: The name of the environment variable.
Returns: The value of the environment variable, or null if not set.
Function argc
1
func argc() -> int
Retrieves the number of command-line arguments.
Returns: The number of arguments.
Function get_pid
1
func get_pid() -> int
Retrieves the current process identifier.
Returns: The current process identifier.
Function argv
1
func argv(index: int) -> string
Retrieves the command-line argument at the specified index.
Parameters:
index: The argument index.
Returns: The command-line argument string.
Function abort
1
func abort(message: string) -> void
Aborts the program with the specified message.
Parameters:
message: The abort message.
Function errno
1
func errno() -> int
Retrieves the last runtime error number.
Returns: The error number (errno).
Function system
1
func system(cmd: string) -> int
Execute a system command and return its exit code.
Parameters:
cmd: The command string to execute.
Returns: The exit status code.