| 1 |
<html><head><title>XLISP symbol-name</title> |
| 2 |
|
| 3 |
<link rel="stylesheet" type="text/css" href="reference.css"> |
| 4 |
|
| 5 |
</head> |
| 6 |
|
| 7 |
<body> |
| 8 |
|
| 9 |
<a href="../start.htm">Nyquist / XLISP 2.0</a> - |
| 10 |
<a href="../manual/contents.htm">Contents</a> | |
| 11 |
<a href="../tutorials/tutorials.htm">Tutorials</a> | |
| 12 |
<a href="../examples/examples.htm">Examples</a> | |
| 13 |
<a href="reference-index.htm">Reference</a> |
| 14 |
|
| 15 |
<hr> |
| 16 |
|
| 17 |
<h1>symbol-name</h1> |
| 18 |
|
| 19 |
<hr> |
| 20 |
|
| 21 |
<p><table cellpadding="0" cellspacing="0" style="margin-left:10px"><tbody> |
| 22 |
<tr valign="top"> |
| 23 |
<td><nobr>Type:</nobr></td> |
| 24 |
<td><nobr> - </nobr></td> |
| 25 |
<td width="100%"><nobr>function (subr)</nobr></td> |
| 26 |
</tr> |
| 27 |
<tr valign="top"> |
| 28 |
<td><nobr>Source:</nobr></td> |
| 29 |
<td><nobr> - </nobr></td> |
| 30 |
<td width="100%"><nobr>xlbfun.c</nobr></td> |
| 31 |
</tr> |
| 32 |
</tbody></table></p> |
| 33 |
|
| 34 |
<h2>Syntax</h2> |
| 35 |
|
| 36 |
<p><div class="box"> |
| 37 |
|
| 38 |
<dl> |
| 39 |
<dt>(<b>symbol-name</b> <i>symbol</i>)</dt> |
| 40 |
<dd><i>symbol</i> - an expression that evaluates to a symbol name<br> |
| 41 |
returns - the symbol's print name</dd> |
| 42 |
</dl> |
| 43 |
|
| 44 |
</div></p> |
| 45 |
|
| 46 |
<h2>Description</h2> |
| 47 |
|
| 48 |
<p>The 'symbol-name' function takes the 'symbol' expression and returns the |
| 49 |
printable string of the 'symbol'. If the 'symbol' had not existed, then it |
| 50 |
will be created and <a href="intern.htm">intern</a>ed into the |
| 51 |
system symbol table |
| 52 |
<nobr><a href="global-obarray.htm">*obarray*</a> ,</nobr> but with it's |
| 53 |
value unbound and an empty property list.</p> |
| 54 |
|
| 55 |
<h2>Examples</h2> |
| 56 |
|
| 57 |
<pre class="example"> |
| 58 |
(symbol-name 'foo) <font color="#008844">; returns "FOO"</font> |
| 59 |
(symbol-name 'gleep) <font color="#008844">; returns "GLEEP"</font> |
| 60 |
|
| 61 |
(setq my-symbol 'flop) <font color="#008844">; define MY-SYMBOL</font> |
| 62 |
(symbol-name my-symbol) <font color="#008844">; returns "FLOP"</font> |
| 63 |
</pre> |
| 64 |
|
| 65 |
<p><b>XLISP Bug:</b> The 'symbol-name' function signals a 'bad |
| 66 |
argument type' error with the <nobr>symbol |
| 67 |
<a href="nil.htm">NIL</a></nobr> <nobr>[Nyquist 3.03</nobr> in |
| 68 |
<nobr>December 2010]</nobr>.</p> |
| 69 |
|
| 70 |
<p><nobr> <a href="#top">Back to Top</nobr></a></p> |
| 71 |
|
| 72 |
<hr> |
| 73 |
|
| 74 |
<a href="../start.htm">Nyquist / XLISP 2.0</a> - |
| 75 |
<a href="../manual/contents.htm">Contents</a> | |
| 76 |
<a href="../tutorials/tutorials.htm">Tutorials</a> | |
| 77 |
<a href="../examples/examples.htm">Examples</a> | |
| 78 |
<a href="reference-index.htm">Reference</a> |
| 79 |
|
| 80 |
</body></html> |