⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 refd.html

📁 A very small LISP implementation with several packages and demo programs.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>D</title><link rel="stylesheet" href="doc.css" type="text/css"></head><body><h1>D</h1><dl><dt><a name="*DB"><code>*DB</code></a><dd>A global constant holding the external symbol <code>{1}</code>, the databaseroot. All transient symbols in a database can be reached from that root. Exceptduring debugging, any explicit literal access to symbols in the database shouldbe avoided, because otherwise a memory leak might occur (The garbage collectortemporarily sets <code>*DB</code> to <code>NIL</code> and restores its valueafter collection, thus disposing of all external symbols not currently used inthe program).<p><pre><code>: (show *DB){1} NIL   +City {P}   +Person {3}-> {1}: (show '{P}){P} NIL   nm (566 . {AhDx})-> {P}: (show '{3}){3} NIL   tel (681376 . {Agyl})   nm (1461322 . {2gu7})-> {3}</code></pre><dt><a name="*Dbg"><code>*Dbg</code></a><dd>A boolean variable indicating "debug mode". When non-<code>NIL</code>, the<code><a href="ref_.html#$">$</a></code> (tracing) and <code><ahref="ref_.html#!">!</a></code> (breakpoint) functions are enabled, and thecurrent line number and file name will be stored in symbol properties by<code><a href="refD.html#de">de</a></code>, <code><ahref="refD.html#def">def</a></code> and <code><ahref="refD.html#dm">dm</a></code>.<p><pre><code>: (de foo (A B) (* A B))-> foo: (trace 'foo)-> foo: (foo 3 4) foo : 3 4 foo = 12-> 12: (let *Dbg NIL (foo 3 4))-> 12</code></pre><dt><a name="*Dbs"><code>*Dbs</code></a><dd>A global variable holding a list of numbers (block size scale factors, asneeded by <code><a href="refP.html#pool">pool</a></code>). It is typically setby <code><a href="refD.html#dbs">dbs</a></code>and <code><a href="refD.html#dbs+">dbs+</a></code>.<p><pre><code>: *Dbs-> (1 2 1 0 2 3 3 3)</code></pre><dt><a name="daemon"><code>(daemon 'sym . prg) -> fun<br>(daemon '(sym . cls) . prg) -> fun</code></a><dd>Inserts <code>prg</code> in the beginning of the function or method body of<code>sym</code>. Built-in functions (C-function pointer) are automaticallyconverted to Lisp expressions. See also <code><ahref="refE.html#expr">expr</a></code>, <code><ahref="refP.html#patch">patch</a></code> and <code><ahref="refR.html#redef">redef</a></code>.<p><pre><code>: (de hello () (prinl "Hello world!"))-> hello: (daemon 'hello (prinl "# This is the hello world program"))-> (NIL (prinl "# This is the hello world program") (prinl "Hello world!")): (hello)# This is the hello world programHello world!-> "Hello world!": (daemon '* (msg 'Multiplying))-> (@ (msg 'Multiplying) (pass $134532148)): *-> (@ (msg 'Multiplying) (pass $134532148)): (* 1 2 3)Multiplying-> 6</code></pre><dt><a name="dat$"><code>(dat$ 'dat ['sym]) -> sym</code></a><dd>Formats a <code><a href="refD.html#date">date</a></code> <code>dat</code> inISO format, with an optional delimiter character <code>sym</code>. See also<code><a href="ref_.html#$dat">$dat</a></code>, <code><ahref="refT.html#tim$">tim$</a></code>, <code><ahref="refD.html#datStr">datStr</a></code> and <code><ahref="refD.html#datSym">datSym</a></code>.<p><pre><code>: (dat$ (date))-> "20070601": (dat$ (date) "-")-> "2007-06-01"</code></pre><dt><a name="datStr"><code>(datStr 'dat ['flg]) -> sym</code></a><dd>Formats a <code><a href="refD.html#date">date</a></code> according to thecurrent <code><a href="refL.html#locale">locale</a></code>. If <code>flg</code>is non-<code>NIL</code>, the year will be formatted modulo 100. See also<code><a href="refD.html#dat$">dat$</a></code>, <code><ahref="refD.html#datSym">datSym</a></code>, <code><ahref="refS.html#strDat">strDat</a></code>, <code><ahref="refE.html#expDat">expDat</a></code>, <code><ahref="refE.html#expTel">expTel</a></code> and <code><ahref="refD.html#day">day</a></code>.<p><pre><code>: (datStr (date))-> "2007-06-01": (locale "DE" "de")-> NIL: (datStr (date))-> "01.06.2007": (datStr (date) T)-> "01.06.07"</code></pre><dt><a name="datSym"><code>(datSym 'dat) -> sym</code></a><dd>Formats a <code><a href="refD.html#date">date</a></code> <code>dat</code> inin symbolic format (DDmmmYY). See also <code><ahref="refD.html#dat$">dat$</a></code> and <code><ahref="refD.html#datStr">datStr</a></code>.<p><pre><code>: (datSym (date))-> "01jun07"</code></pre><dt><a name="date"><code>(date ['T]) -> dat<br>(date 'dat) -> (y m d)<br>(date 'y 'm 'd) -> dat | NIL<br>(date '(y m d)) -> dat | NIL</code></a><dd>Calculates a calendar date, represented as the number of days since first ofMarch in the year 0. When called without arguments, the current date isreturned. When called with a <code>T</code> argument, the current CoordinatedUniversal Time (UTC) is returned. When called with a single number<code>dat</code>, it is taken as a date and a list with the corresponding year,month and day is returned. When called with three numbers (or a list of threenumbers) for the year, month and day, the corresponding date is returned (or<code>NIL</code> if they do not represent a legal date). See also <code><ahref="refT.html#time">time</a></code>, <code><ahref="ref_.html#$dat">$dat</a></code>, <code><ahref="refD.html#dat$">dat$</a></code>, <code><ahref="refD.html#datSym">datSym</a></code>, <code><ahref="refD.html#datStr">datStr</a></code>, <code><ahref="refS.html#strDat">strDat</a></code>, <code><ahref="refE.html#expDat">expDat</a></code>, <code><ahref="refD.html#day">day</a></code>, <code><ahref="refW.html#week">week</a></code> and <code><ahref="refU.html#ultimo">ultimo</a></code>.<p><pre><code>: (date)                         # Today-> 730589: (date 2000 6 12)               # 12-06-2000-> 730589: (date 2000 22 5)               # Illegal date-> NIL: (date (date))                  # Today's year, month and day-> (2000 6 12): (- (date) (date 2000 1 1))     # Number of days since first of January-> 163</code></pre><dt><a name="day"><code>(day 'dat ['lst]) -> sym</code></a><dd>Returns the name of the day for a given <code><ahref="refD.html#date">date</a></code> <code>dat</code>, in the language of thecurrent <code><a href="refL.html#locale">locale</a></code>. If <code>lst</code>is given, it should be a list of alternative weekday names. See also <code><ahref="refW.html#week">week</a></code>, <code><ahref="refD.html#datStr">datStr</a></code> and <code><ahref="refS.html#strDat">strDat</a></code>.<p><pre><code>: (day (date))-> "Friday": (locale "DE" "de")-> NIL: (day (date))-> "Freitag": (day (date) '("Mo" "Tu" "We" "Th" "Fr" "Sa" "Su"))-> "Fr"</code></pre><dt><a name="db"><code>(db 'var 'cls ['hook] 'any ['var 'any ..]) -> sym | NIL</code></a><dd>Returns a database object of class <code>cls</code>, where the values forthe <code>var</code> arguments correspond to the <code>any</code> arguments. Ifa matching object cannot be found, <code>NIL</code> is returned.<code>var</code>, <code>cls</code> and <code>hook</code> should specify a<code><a href="refT.html#tree">tree</a></code> for <code>cls</code> or one ofits superclasses. See also <code><a href="refA.html#aux">aux</a></code>,<code><a href="refC.html#collect">collect</a></code>, <code><ahref="refR.html#request">request</a></code>, <code><ahref="refF.html#fetch">fetch</a></code>, <code><ahref="refI.html#init">init</a></code> and <code><ahref="refF.html#step">step</a></code>.<p><pre><code>: (db 'nr '+Item 1)-> {3-1}: (db 'nm '+Item "Main Part")-> {3-1}</code></pre><dt><a name="db:"><code>(db: cls ..) -> num</code></a><dd>Returns the database file number for objects of the type given by the<code>cls</code> argument(s). Needed, for example, for the creation of <code><ahref="refN.html#new">new</a></code> objects. See also <code><ahref="refD.html#dbs">dbs</a></code>.<p><pre><code>: (db: +Item)-> 3</code></pre><dt><a name="dbck"><code>(dbck ['cnt] 'flg) -> any</code></a><dd>Performs a low-level integrity check of the current (or <code>cnt</code>'th)database file, and returns <code>NIL</code> (or the number of blocks and symbolsif <code>flg</code> is non-<code>NIL</code>) if everything seems correct.Otherwise, a string indicating an error is returned. As a side effect, possiblyunused blocks (as there might be when a <code><ahref="refR.html#rollback">rollback</a></code> is done before <code><ahref="refC.html#commit">commit</a></code>ing newly allocated (<code><ahref="refN.html#new">new</a></code>) external symbols) are appended to the freelist.<p><pre><code>: (pool "db")-> T: (dbck)-> NIL</code></pre><dt><a name="dbs"><code>(dbs . lst)</code></a><dd>Initializes the global variable <code><ahref="refD.html#*Dbs">*Dbs</a></code>. Each element in <code>lst</code> has anumber in its CAR (the block size scale factor of a database file, to be storedin <code>*Dbs</code>). The CDR elements are either classes (so that objects ofthat class are later stored in the corresponding file), or lists with a class inthe CARs and a list of relations in the CDRs (so that index trees for theserelations go into that file). See also <code><ahref="refD.html#dbs+">dbs+</a></code> and <code><ahref="refP.html#pool">pool</a></code>.<p><pre><code>(dbs   (1 +Role +User)                              # (1 . 128)   (2 +CuSu)                                    # (2 . 256)   (1 +Item +Ord)                               # (3 . 128)   (0 +Pos)                                     # (4 . 64)   (2 (+Role nm) (+User nm))                    # (5 . 256)   (3 (+CuSu nr nm str plz ort cty tel mob))    # (6 . 512)   (3 (+Item nr nm sup pr))                     # (7 . 512)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -