picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

refK.html (2097B)


      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
      2 <html lang="en">
      3 <head>
      4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      5 <title>K</title>
      6 <link rel="stylesheet" href="doc.css" type="text/css">
      7 </head>
      8 <body>
      9 
     10 <h1>K</h1>
     11 
     12 <dl>
     13 
     14 <dt><a name="+Key"><code>+Key</code></a>
     15 <dd>Prefix class for maintaining unique indexes to <code><a
     16 href="refR.html#+relation">+relation</a></code>s, a subclass of <code><a
     17 href="refI.html#+index">+index</a></code>. Accepts an optional argument for a
     18 <code><a href="refH.html#+Hook">+Hook</a></code> attribute. See also <a
     19 href="ref.html#dbase">Database</a>.
     20 
     21 <pre><code>
     22 (rel nr (+Need +Key +Number))  # Mandatory, unique Customer/Supplier number
     23 </code></pre>
     24 
     25 <dt><a name="key"><code>(key ['cnt]) -> sym</code></a>
     26 <dd>Returns the next character from standard input as a single-character
     27 transient symbol. The console is set to raw mode. While waiting for a key press,
     28 a <code>select</code> system call is executed for all file descriptors and
     29 timers in the <code>VAL</code> of the global variable <code><a
     30 href="refR.html#*Run">*Run</a></code>. If <code>cnt</code> is
     31 non-<code>NIL</code>, that amount of milliseconds is waited maximally, and
     32 <code>NIL</code> is returned upon timeout. See also <code><a
     33 href="refR.html#raw">raw</a></code> and <code><a
     34 href="refW.html#wait">wait</a></code>.
     35 
     36 <pre><code>
     37 : (key)           # Wait for a key
     38 -> "a"            # 'a' pressed
     39 </code></pre>
     40 
     41 <dt><a name="kill"><code>(kill 'pid ['cnt]) -> flg</code></a>
     42 <dd>Sends a signal with the signal number <code>cnt</code> (or SIGTERM if
     43 <code>cnt</code> is not given) to the process with the ID <code>pid</code>.
     44 Returns <code>T</code> if successful.
     45 
     46 <pre><code>
     47 : (kill *Pid 20)                                # Stop current process
     48 
     49 [2]+  Stopped               pil +               # Unix shell
     50 $ fg                                            # Job control: Foreground
     51 pil +
     52 -> T                                            # 'kill' was successful
     53 </code></pre>
     54 
     55 </dl>
     56 
     57 </body>
     58 </html>