You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SPECIFICATION.html
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -344,6 +344,7 @@
344
344
- `STRIP(STR: string,STR: remove):STR` — Returns a `STR` formed by removing every occurrence of the substring `remove` from `string`. The `remove` argument must be a non-empty string; supplying an empty `remove` raises a runtime error.
345
345
- `REPLACE(STR: string,STR: a,STR: b):STR` — Returns a `STR` formed by replacing every occurrence of the substring `a` in `string` with `b`. The `a` argument must be a non-empty string; supplying an empty `a` raises a runtime error.
346
346
- `ASSERT(ANY: a)` ; crashes if `INT`-style`truthinessof`a`is0
- `MAIN():INT` — Returns `1` when the call site belongs to the primary program file (the file passed as the interpreter's first argument, or `<string>` when `-source` is used). Returns `0` when executed from code that came from an `IMPORT` (including nested imports). The result is determined solely by the source file that contains the call expression, not by the caller's call stack.
348
349
- `DEL(SYMBOL: x)` ; delete variable `x` from environment
349
350
- `EXIT()` or `EXIT(INT:code)` — Requests immediate termination of the interpreter. If an integer `code` is supplied, it is used as the interpreter's process exit code; otherwise `0` is used. Execution stops immediately when `EXIT` is executed (no further statements run), and an entry is recorded in the state log to make deterministic replay possible. Using `EXIT` inside a function terminates the entire program (not just the function).
-`GOTOPOINT(n)`;registeragotopointwithidentifier`n`atthisstatement's location (identifier may be `INT` or `STR`) (n evaluated at runtime). Gotopoints are visible across the containing function or top-level scope rather than being restricted to a single lexical block.
-`ASYNC{ block }`;execute`block`asynchronouslyinaseparatethread(whilesharingthesamenamespace);thecallercontinuesexecutingimmediatelywithoutwaitingfortheasyncblocktocomplete.Anyuncaughterrorsintheasyncblockareloggedtotheinterpreter's error log but do not affect the caller.
0 commit comments