1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>V</title>
<link rel="stylesheet" href="doc.css" type="text/css">
</head>
<body>
<h1>V</h1>
<dl>
<dt><a name="val"><code>(val 'var) -> any</code></a>
<dd>Returns the current value of <code>var</code>. See also <code><a
href="refS.html#setq">setq</a></code>, <code><a
href="refS.html#set">set</a></code> and <code><a
href="refD.html#def">def</a></code>.
<pre><code>
: (setq L '(a b c))
-> (a b c)
: (val 'L)
-> (a b c)
: (val (cdr L))
-> b
</code></pre>
<dt><a name="val/3"><code>val/3</code></a>
<dd><a href="ref.html#pilog">Pilog</a> predicate that returns the value of an
object's attribute. Typically used in database queries. The first argument is a
Pilog variable to bind the value, the second is the object, and the third and
following arguments are used to apply the <code><a
href="refG.html#get">get</a></code> algorithm to that object. See also <code><a
href="refD.html#db/3">db/3</a></code> and <code><a
href="refS.html#select/3">select/3</a></code>.
<pre><code>
: (?
(db nr +Item (2 . 5) @Item) # Fetch articles 2 through 5
(val @Nm @Item nm) # Get item description
(val @Sup @Item sup nm) ) # and supplier's name
@Item={3-2} @Nm="Spare Part" @Sup="Seven Oaks Ltd." @Item={3-3} @Nm="Auxiliary Construction" @Sup="Active Parts Inc."
@Item={3-4} @Nm="Enhancement Additive" @Sup="Seven Oaks Ltd."
@Item={3-5} @Nm="Metal Fittings" @Sup="Active Parts Inc."
-> NIL
</code></pre>
<dt><a name="var"><code>(var sym . any) -> any</code></a>
<dt><code>(var (sym . cls) . any) -> any</code>
<dd>Defines a class variable <code>sym</code> with the initial value
<code>any</code> for the current class, implicitly given by the value of the
global variable <code><a href="refC.html#*Class">*Class</a></code>, or - in the
second form - for the explicitly given class cls. See also <a
href="ref.html#oop">OO Concepts</a>, <code><a
href="refR.html#rel">rel</a></code> and <code><a
href="refV.html#var:">var:</a></code>.
<pre><code>
: (class +A)
-> +A
: (var a . 1)
-> 1
: (var b . 2)
-> 2
: (show '+A)
+A NIL
b 2
a 1
-> +A
</code></pre>
<dt><a name="var:"><code>(var: sym) -> any</code></a>
<dd>Fetches the value of a class variable <code>sym</code> for the current
object <code><a href="refT.html#This">This</a></code>, by searching the property
lists of its class(es) and supperclasses. See also <code><a
href="ref.html#oop">OO Concepts</a></code>, <code><a
href="refV.html#var">var</a></code>, <code><a
href="refW.html#with">with</a></code>, <code><a
href="refM.html#meta">meta</a></code>, <code><a href="ref_.html#:">:</a></code>,
<code><a href="ref_.html#=:">=:</a></code> and <code><a
href="ref_.html#::">::</a></code>.
<pre><code>
: (object 'O '(+A) 'a 9 'b 8)
-> O
: (with 'O (list (: a) (: b) (var: a) (var: b)))
-> (9 8 1 2)
</code></pre>
<dt><a name="version"><code>(version ['flg]) -> lst</code></a>
<dd>Prints the current version as a string of dot-separated numbers, and returns
the current version as a list of numbers. The JVM- and C-versions print an
additional "JVM" or "C", respectively, separated by a space. When
<code>flg</code> is non-NIL, printing is suppressed.
<pre><code>
$ pil -version
3.0.1.22
: (version T)
-> (3 0 1 22)
</code></pre>
<dt><a name="vi"><code>(vi 'sym) -> sym</code></a>
<dt><code>(vi 'sym 'cls) -> sym</code>
<dt><code>(vi '(sym . cls)) -> sym</code>
<dt><code>(vi) -> NIL</code>
<dd>Opens the "vi" editor on the function or method definition of
<code>sym</code>. A call to <code><a href="refL.html#ld">ld</a></code>
thereafter will <code><a href="refL.html#load">load</a></code> the modified
file. See also <code><a href="refD.html#doc">doc</a></code>, <code><a
href="refE.html#edit">edit</a></code>, <code><a
href="refD.html#*Dbg">*Dbg</a></code>, <code><a
href="refD.html#debug">debug</a></code> and <code><a
href="refP.html#pp">pp</a></code>.
<pre><code>
: (vi 'url> '+CuSu) # Edit the method's source code, then exit from 'vi'
-> T
</code></pre>
<dt><a name="view"><code>(view 'lst ['T]) -> any</code></a>
<dd>Views <code>lst</code> as tree-structured ASCII graphics. When the
<code>T</code> argument is given, <code>lst</code> should be a binary tree
structure (as generated by <code><a href="refI.html#idx">idx</a></code>), which
is then shown as a left-rotated tree. See also <code><a
href="refP.html#pretty">pretty</a></code> and <code><a
href="refS.html#show">show</a></code>.
<pre><code>
: (balance 'I '(a b c d e f g h i j k l m n o))
-> NIL
: I
-> (h (d (b (a) c) f (e) g) l (j (i) k) n (m) o)
: (view I)
+-- h
|
+---+-- d
| |
| +---+-- b
| | |
| | +---+-- a
| | |
| | +-- c
| |
| +-- f
| |
| +---+-- e
| |
| +-- g
|
+-- l
|
+---+-- j
| |
| +---+-- i
| |
| +-- k
|
+-- n
|
+---+-- m
|
+-- o
-> NIL
: (view I T)
o
n
m
l
k
j
i
h
g
f
e
d
c
b
a
-> NIL
</code></pre>
</dl>
</body>
</html>
|