public class Application:
Global runtime entry point exposed by default in every Klyn program.
Static members can be used with or without the Application. prefix.
Application.print( "ok" ) print( "ok" )
| Modifier and Type | Member | Description |
|---|---|---|
| public const | EXIT_FAILUREEXIT_FAILURE as Int = -1 |
Conventional failure exit code (`-1`). |
| public const | EXIT_SUCCESSEXIT_SUCCESS as Int = 0 |
Conventional success exit code (`0`). |
| Modifier and Type | Member | Description |
|---|---|---|
| public static native readonly property | arguments | Command-line arguments passed to the program. |
| public static readonly property | classLoaderclassLoader as SystemClassLoader: |
Returns the runtime system class loader. |
| public static native readonly property | environmentVariables | Environment variables of the current process. |
| public static native readonly property | errerr as TextWriter |
Standard error stream of the process. |
| public static native readonly property | inin as TextReader |
Standard input stream of the process. |
| public static native readonly property | outout as TextWriter |
Standard output stream of the process. |
| public static native readonly property | pidpid as UInt |
Process identifier of the current runtime. |
| public static native readonly property | properties | System properties exposed by the runtime. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static native | compilecompile(code as String) throws SyntaxError, TypeError, Exception |
Compiles a Klyn script provided as a string. |
| public static native | currentTimeMilliscurrentTimeMillis() as ULong |
Returns the current time in milliseconds since the Unix epoch. |
| public static native | evaleval(code as String) as Object throws SyntaxError, TypeError, Exception |
Compiles and executes a Klyn script provided as a string. |
| public static native | exitexit(exitCode as Int) |
Terminates the current process. |
| public static native | inputinput(prompt as String, inputStream as TextReader) as String |
Reads a line from the given input stream, after optionally printing a prompt. |
| public static native | printprint(values... as Object, sep as String, end as String, output as TextWriter) |
Prints one or more values to the given output stream. |
| public static | rangerange<T>(start as T, stop as T) as Generator<T>: |
Builds a Python-style integer range from `start` to `stop` (exclusive). |
| public static | rangerange<T>(start as T, stop as T, delta as T) as Generator<T>: |
Builds a Python-style integer range from `start` to `stop` (exclusive) using the provided step. |
| public static | rangerange<T>(stop as T) as Generator<T>: |
Builds a Python-style integer range from `0` to `stop` (exclusive). |
| public static | sumsum<T>(values as IList<T>) as T: |
Returns the sum of all numeric values from a read-only list. |
| public static | sumsum<T>(values as Set<T>) as T: |
Returns the sum of all numeric values from a set. |
| public static | sumsum<T>(values as klyn.math.NDArray<T>) as T: |
Returns the sum of all numeric values from an NDArray. |
| public static | sumsum<T>(values... as T) as T: |
Returns the sum of all numeric parameters. |
| public static native | type | Returns the runtime type of a value. |