source: project/wiki/eggref/5/symbol-utils @ 35801

Last change on this file since 35801 was 35801, checked in by kon, 12 months ago

rel 2.0.0

File size: 4.1 KB
Line 
1[[tags: egg]]
2
3== symbol-utils
4
5[[toc:]]
6
7
8== Documentation
9
10=== Argument Conventions
11
12{{SYM}} is a {{symbol}}
13
14{{OBJ}} is an arbitrary Scheme {{object}}
15
16A printname is the string form of a symbol.
17
18=== symbol-value-utils
19
20==== Usage
21
22<enscript language=scheme>
23(require-extension symbol-value-utils)
24</enscript>
25
26==== unbound-value
27
28<macro>(unbound-value) -> #<unbound></macro>
29
30==== unbound-value?
31
32<macro>(unbound-value? OBJ) -> boolean</macro>
33
34==== unbound?
35
36<macro>(unbound? SYM) -> boolean</macro>
37
38==== symbol-value
39
40<macro>(symbol-value SYM [DEF]) -> *</macro>
41
42Returns {{SYM}} binding or {{DEF}} when unbound.
43
44==== unspecified-value
45
46<procedure>(unspecified-value) -> #<unspecified></procedure>
47
48==== unspecified-value?
49
50<macro>(unspecified-value? OBJ) -> boolean</macro>
51
52==== unspecified?
53
54<macro>(unspecified? OBJ) -> boolean</macro>
55
56=== symbol-name-utils
57
58==== Usage
59
60<enscript language=scheme>
61(require-extension symbol-name-utils)
62</enscript>
63
64==== keyword->symbol
65
66<procedure>(keyword->symbol KEY) -> symbol</procedure>
67
68==== keyword->uninterned-symbol
69
70<procedure>(keyword->uninterned-symbol KEY) -> symbol</procedure>
71
72==== symbol->keyword
73
74<procedure>(symbol->keyword SYM) -> keyword</procedure>
75
76==== symbol-printname-details
77
78<procedure>(symbol-printname-details SYM) -> (string string)</procedure>
79
80Returns 2 values: the {{string}}, and any qualification prefix
81{{string}}, for {{SYM}}
82
83==== symbol-printname=?
84
85<procedure>(symbol-printname=? X Y) -> boolean</procedure>
86
87{{X}} & {{Y}} are {{symbol}}.
88
89==== symbol-printname<?
90
91<procedure>(symbol-printname<? X Y) -> boolean</procedure>
92
93{{X}} & {{Y}} are {{symbol}}.
94
95==== symbol-printname-length
96
97<procedure>(symbol-printname-length SYM) -> integer</procedure>
98
99==== max-symbol-printname-length
100
101<procedure>(max-symbol-printname-length SYMS) -> integer</procedure>
102
103{{SYMS}} is a {{list}} of {{symbol}}.
104
105=== symbol-qualified-utils
106
107==== Usage
108
109<enscript language=scheme>
110(require-extension symbol-qualified-utils)
111</enscript>
112
113==== make-qualified-symbol
114
115<procedure>(make-qualified-symbol PREFIX NAME) -> symbol</procedure>
116
117{{PREFIX}} & {{NAME}} are either {{symbol}} or {{string}}.
118
119==== make-qualified-uninterned-symbol
120
121<procedure>(make-qualified-uninterned-symbol PREFIX NAME) -> symbol</procedure>
122
123==== qualified-symbol?
124
125<procedure>(qualified-symbol? SYM) -> boolean</procedure>
126
127==== symbol->qualified-string
128
129<procedure>(symbol->qualified-string SYM) -> string</procedure>
130
131=== symbol-lolevel-utils
132
133==== Usage
134
135<enscript language=scheme>
136(require-extension symbol-lolevel-utils)
137</enscript>
138
139==== interned-symbol?
140
141<procedure>(interned-symbol? SYM) -> boolean</procedure>
142
143
144== Usage
145
146<enscript language=scheme>
147(require-extension symbol-utils)
148</enscript>
149
150
151== Author
152
153[[/users/kon-lovett|Kon Lovett]]
154
155
156== Version history
157
158; 2.0.0 : CHICKEN 5 release.
159; 1.2.0 : Add {{keyword->uninterned-symbol}} & {{keyword->symbol}}.
160; 1.1.0 : Add {{symbol-name-utils}},  {{symbol-value-utils}},  {{symbol-qualified-utils}},  {{symbol-lolevel-utils}} modules.
161; 1.0.3 : Add types & better type checking.
162; 1.0.2 : Fix for ticket #630.
163; 1.0.1 :
164; 1.0.0 : Hello.
165
166
167== License
168
169Copyright (C) 2010 Kon Lovett.  All rights reserved.
170
171Permission is hereby granted, free of charge, to any person obtaining a
172copy of this software and associated documentation files (the Software),
173to deal in the Software without restriction, including without limitation
174the rights to use, copy, modify, merge, publish, distribute, sublicense,
175and/or sell copies of the Software, and to permit persons to whom the
176Software is furnished to do so, subject to the following conditions:
177
178The above copyright notice and this permission notice shall be included
179in all copies or substantial portions of the Software.
180
181THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
182IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
183FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
184THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
185OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
186ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
187OTHER DEALINGS IN THE SOFTWARE.
Note: See TracBrowser for help on using the repository browser.