📄 refs.html
字号:
: (mapcar pack (split (chop "The quick brown fox") " "))-> ("The" "quick" "brown" "fox")</code></pre><dt><a name="sqrt"><code>(sqrt 'num) -> num</code></a><dd>Returns the square root of the <code>num</code> argument.<p><pre><code>: (sqrt 64)-> 8: (sqrt 1000)-> 31: (sqrt 10000000000000000000000000000000000000000)-> 100000000000000000000</code></pre><dt><a name="stamp"><code>(stamp ['dat 'tim]) -> sym</code></a><dd>Returns a date-time string in the form "YYYY-MM-DD HH:MM:SS". If<code>dat</code> and/or <code>tim</code> is missing, the current date or time isused. See also <code><a href="refD.html#date">date</a></code> and <code><ahref="refT.html#time">time</a></code>.<p><pre><code>: (stamp)-> "2000-09-12 07:48:04": (stamp (date) 0)-> "2000-09-12 00:00:00": (stamp (date 2000 1 1) (time 12 0 0))-> "2000-01-01 12:00:00"</code></pre><dt><a name="state"><code>(state 'var ((sym|lst sym [. prg]) . prg) ..) -> any</code></a><dd>Implements a finite state machine. The variable <code>var</code> holds thecurrent state as a symbolic value. When a clause is found that contains thecurrent state in its CAAR <code>sym|lst</code> value, and either has no<code>prg</code> condition in its CDDAR, or that condition returnsnon-<code>NIL</code>, the current state will be set to the CADAR<code>sym</code> of the clause, the body <code>prg</code> in its CDR will beexecuted, and the result returned. <code>T</code> is a catch-all for any state.If no state-condition matches, <code>NIL</code> is returned. See also <code><ahref="refC.html#case">case</a></code> and <code><ahref="refJ.html#job">job</a></code>.<p><pre><code>: (de tst () (job '((Cnt . 4)) (state '(start) ((start run) (printsp 'start)) ((run run (gt0 (dec 'Cnt))) (printsp 'run) ) ((run stop) (printsp 'run)) ((stop start) (setq Cnt 4) (println 'stop)) ) ) )-> tst: (do 12 (tst))start run run run run stopstart run run run run stop-> stop: (pp 'tst)(de tst NIL (job '((Cnt . 4)) (state '(start) ...-> tst: (do 3 (tst))start run run -> run: (pp 'tst)(de tst NIL (job '((Cnt . 2)) (state '(run) ...-> tst</code></pre><dt><a name="stem"><code>(stem 'lst 'any ..) -> lst</code></a><dd>Returns the tail of <code>lst</code> that does not contain any of the<code>any</code> arguments. <code>(stem 'lst 'any ..)</code> is equivalent to<code>(last (split 'lst 'any ..))</code>. See also <code><ahref="refT.html#tail">tail</a></code> and <code><ahref="refS.html#split">split</a></code>.<p><pre><code>: (stem (chop "abc/def\\ghi") "/" "\\")-> ("g" "h" "i")</code></pre><dt><a name="step"><code>(step 'lst ['flg]) -> any</code></a><dd>Single-steps iteratively through a database tree. <code>lst</code> is astructure as received from <code><a href="refI.html#init">init</a></code>. If<code>flg</code> is non-<code>NIL</code>, partial keys are skipped. See also<code><a href="refT.html#tree">tree</a></code>, <code><ahref="refL.html#leaf">leaf</a></code> and <code><ahref="refF.html#fetch">fetch</a></code>.<p><pre><code>: (setq Q (init (tree 'nr '+Item) 3 5))-> (((3 . 5) ((3 NIL . {3-3}) (4 NIL . {3-4}) (5 NIL . {3-5}) (6 NIL . {3-6}) (7 NIL . {3-8})))): (get (step Q) 'nr)-> 3: (get (step Q) 'nr)-> 4: (get (step Q) 'nr)-> 5: (get (step Q) 'nr)-> NIL</code></pre><dt><a name="stk"><code>(stk any ..) -> T</code></a><dd>Displays a dump of the internal runtime stack. All (unevaluated)<code>any</code> arguments are printed as a header, then each stack entry isprinted per line, preceded by its (hexadecimal) address. See also <code><ahref="refE.html#env">env</a></code>.<p><pre><code>: (cons 'A (stk Test))(Test)BFFFF69C ABFFFF70C (cons 'A (stk Test))-> (A . T)</code></pre><dt><a name="store"><code>(store 'tree 'any1 'any2 ['(num1 . num2)])</code></a><dd>Stores a value <code>any2</code> for the key <code>any1</code> in a databasetree. <code>num1</code> is a database file number, as used in <code><ahref="refN.html#new">new</a></code> (defaulting to 1), and <code>num2</code> adatabase block size (defaulting to 256). When <code>any2</code> is<code>NIL</code>, the corresponding entry is deleted from the tree. See also<code><a href="refT.html#tree">tree</a></code> and <code><ahref="refF.html#fetch">fetch</a></code>.<p><pre><code>: (store (tree 'nr '+Item) 2 '{3-2})</code></pre><dt><a name="str"><code>(str 'sym ['sym1]) -> lst<br>(str 'lst) -> sym</code></a><dd>In the first form, the string <code>sym</code> is parsed into a list. Thismechanism is also used by <code><a href="refL.html#load">load</a></code>. If<code>sym1</code> is given, it should specify a set of characters, and<code>str</code> will then return a list of tokens analog to <code><ahref="refR.html#read">read</a></code>. The second form does the reverseoperation by building a string from a list. See also <code><ahref="refA.html#any">any</a></code>, <code><ahref="refN.html#name">name</a></code> and <code><ahref="refS.html#sym">sym</a></code>.<p><pre><code>: (str "a (1 2) b")-> (a (1 2) b): (str '(a "Hello" DEF))-> "a \"Hello\" DEF": (str "a*3+b*4" "_")-> (a * 3 + b * 4)</code></pre><dt><a name="strDat"><code>(strDat 'sym) -> dat</code></a><dd>Converts a string <code>sym</code> in the date format of the current<code><a href="refL.html#locale">locale</a></code> to a <code><ahref="refD.html#date">date</a></code>. See also <code><ahref="refE.html#expDat">expDat</a></code>, <code><ahref="ref_.html#$dat">$dat</a></code> and <code><ahref="refD.html#datStr">datStr</a></code>.<p><pre><code>: (strDat "2007-06-01")-> 733134: (strDat "01.06.2007")-> NIL: (locale "DE" "de")-> NIL: (strDat "01.06.2007")-> 733134: (strDat "1.6.2007")-> 733134</code></pre><dt><a name="strip"><code>(strip 'any) -> any</code></a><dd>Strips all leading <code>quote</code> symbols from <code>any</code>.<p><pre><code>: (strip 123)-> 123: (strip '''(a))-> (a): (strip (quote quote a b c))-> (a b c)</code></pre><dt><a name="str?"><code>(str? 'any) -> sym | NIL</code></a><dd>Returns the argument <code>any</code> when it is a transient symbol(string), otherwise <code>NIL</code>. See also <code><ahref="refS.html#sym?">sym?</a></code>, <code><ahref="refB.html#box?">box?</a></code> and <code><ahref="refE.html#ext?">ext?</a></code>.<p><pre><code>: (str? 123)-> NIL: (str? '{ABC})-> NIL: (str? 'abc)-> NIL: (str? "abc")-> "abc"</code></pre><dt><a name="sub?"><code>(sub? 'sym1 'sym2) -> flg</code></a><dd>Returns non-<code>NIL</code> when the name of the first symbol<code>sym1</code> is a substring of the name of the second symbol<code>sym2</code>. See also <code><a href="refP.html#pre?">pre?</a></code>.<p><pre><code>: (sub? "def" "abcdef")-> T: (sub? "abb" "abcdef")-> NIL: (sub? "" "abcdef")-> T</code></pre><dt><a name="subr"><code>(subr 'sym) -> num</code></a><dd>Converts a Lisp-function that was previously converted with <code><ahref="refE.html#expr">expr</a></code> back to a C-function.<p><pre><code>: sqrt-> 67325664: (expr 'sqrt)-> (@ (pass $134533847)): (subr 'sqrt)-> 67325664</code></pre><dt><a name="sum"><code>(sum 'fun 'lst ..) -> num</code></a><dd>Applies <code>fun</code> to each element of <code>lst</code>. Whenadditional <code>lst</code> arguments are given, their elements are also passedto <code>fun</code>. Returns the sum of all numeric values returned from<code>fun</code>.<p><pre><code>: (setq A 1 B 2 C 3)-> 3: (sum val '(A B C))-> 6: (sum # Total size of symbol list values '((X) (and (pair (val X)) (size @)) ) (what) )-> 32021</code></pre><dt><a name="super"><code>(super ['any ..]) -> any</code></a><dd>Can only be used inside methods. Sends the current message to the currentobject <code>This</code>, this time starting the search for a method at thesuperclass(es) of the class where the current method was found. See also<code><a href="ref.html#oop">OO Concepts</a></code>, <code><ahref="refE.html#extra">extra</a></code>, <code><ahref="refM.html#method">method</a></code>, <code><ahref="refM.html#meth">meth</a></code>, <code><ahref="refS.html#send">send</a></code> and <code><ahref="refT.html#try">try</a></code>.<p><pre><code>(dm stop> () # 'stop>' method of current class (super) # Call the 'stop>' method of the superclass ... ) # other things</code></pre><dt><a name="sym"><code>(sym 'any) -> sym</code></a><dd>Generate the printed representation of <code>any</code> into the name of anew symbol <code>sym</code>. See also <code><ahref="refA.html#any">any</a></code>, <code><ahref="refN.html#name">name</a></code> and <code><ahref="refS.html#str">str</a></code>.<p><pre><code>: (sym '(abc "Hello" 123))-> "(abc \"Hello\" 123)"</code></pre><dt><a name="sym?"><code>(sym? 'any) -> flg</code></a><dd>Returns <code>T</code> when the argument <code>any</code> is a symbol. Seealso <code><a href="refS.html#str?">str?</a></code>, <code><ahref="refB.html#box?">box?</a></code> and <code><ahref="refE.html#ext?">ext?</a></code>.<p><pre><code>: (sym? 'a)-> T: (sym? NIL)-> T: (sym? 123)-> NIL: (sym? '(a b))-> NIL</code></pre><dt><a name="sync"><code>(sync) -> flg</code></a><dd>Waits for pending data from all family processes. While other processes arestill sending data (via the <code><a href="refT.html#tell">tell</a></code>mechanism), a <code>select</code> system call is executed for all filedescriptors and timers in the <code>VAL</code> of the global variable <code><ahref="refR.html#*Run">*Run</a></code>. See also <code><ahref="refK.html#key">key</a></code> and <code><ahref="refW.html#wait">wait</a></code>.<p><pre><code>: (or (lock) (sync)) # Ensure database consistency-> T # (numeric process-id if lock failed)</code></pre><dt><a name="sys"><code>(sys 'any ['any]) -> sym</code></a><dd>Returns or sets a system environment variable.<p><pre><code>: (sys "TERM") # Get current value-> "xterm": (sys "TERM" "vt100") # Set new value-> "vt100": (sys "TERM")-> "vt100"</code></pre></dl></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -