diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-03-08 19:32:46 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-03-08 19:32:46 -0500 |
| commit | 43462da01c44e0f5ab1a292c8ac0237480e287db (patch) | |
| tree | e4e6b820920aab85f048e0775c3c8911a9bd91a9 /docs | |
| parent | 5e9b31f06bb601a01ed99f8e1c9986cbe78e1dfa (diff) | |
Specify some of •term
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/spec/system.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/spec/system.html b/docs/spec/system.html index be185367..17159837 100644 --- a/docs/spec/system.html +++ b/docs/spec/system.html @@ -317,6 +317,34 @@ </table> <p><code><span class='Function'>•Out</span></code> prints a string to stdout, with a trailing newline. <code><span class='Function'>•Show</span></code> displays a BQN value to the programmer (the representation is not specified, and does not need to be plain text). <code><span class='Function'>•Fmt</span></code> returns a string (not a character table: lines are separated by linefeeds) indicating how <code><span class='Value'>𝕩</span></code> would be printed by the interactive environment. Both <code><span class='Function'>•Show</span></code> and <code><span class='Function'>•Fmt</span></code> may take a left argument configuring how the value should be formatted.</p> <p><code><span class='Function'>•Repr</span></code> attempts to return a string so that <code><span class='Function'>•BQN</span> <span class='Function'>•Repr</span> <span class='Value'>𝕩</span></code> matches <code><span class='Value'>𝕩</span></code>. If <code><span class='Value'>𝕩</span></code> contains any mutable values (operations or namespaces), this is not possible. However, if such a values is stateless, in the sense that they don't access variables outside of their own scopes, it is permissible for <code><span class='Function'>•Repr</span></code> to return source code that would create a value with identical behavior.</p> +<h3 id="terminal-io"><a class="header" href="#terminal-io">Terminal I/O</a></h3> +<p>The system namespace <code><span class='Value'>•term</span></code> gives fine-grained control of input and output when running in a terminal emulator or similar text-based interface.</p> +<table> +<thead> +<tr> +<th>Name</th> +<th>Summary</th> +</tr> +</thead> +<tbody> +<tr> +<td><code><span class='Function'>Flush</span></code></td> +<td>Flush output buffer</td> +</tr> +<tr> +<td><code><span class='Function'>RawMode</span></code></td> +<td>Set raw mode (no input processing) if <code><span class='Number'>1</span></code>, unset if <code><span class='Number'>0</span></code></td> +</tr> +<tr> +<td><code><span class='Function'>CharB</span></code></td> +<td>Read a character, blocking until one is available</td> +</tr> +<tr> +<td><code><span class='Function'>CharN</span></code></td> +<td>Read a character if available but return <code><span class='Number'>0</span></code> if not</td> +</tr> +</tbody> +</table> <h2 id="interface"><a class="header" href="#interface">Interface</a></h2> <table> <thead> |
