compiler/shared/l0/stdlib/std/system.l0

Module std.system

Overview Symbols grouped by source file: compiler/shared/l0/stdlib/std/system.l0

Module: std.system

Source: compiler/shared/l0/stdlib/std/system.l0 Language: Dea/L0

Imports / Includes

  • sys.rt

Symbols

Function exit

func exit(code: int) -> void

Exits the program with the given exit code.

Parameters:

  • code: The integer exit code.

Function env_get

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

func argc() -> int

Retrieves the number of command-line arguments.

Returns: The number of arguments.

Function get_pid

func get_pid() -> int

Retrieves the current process identifier.

Returns: The current process identifier.

Function argv

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

func abort(message: string) -> void

Aborts the program with the specified message.

Parameters:

  • message: The abort message.

Function errno

func errno() -> int

Retrieves the last runtime error number.

Returns: The error number (errno).

Function system

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.