39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
{ (define LIBNAME "Documents")
|
|
(include "head.tinc") }
|
|
|
|
The teachpack <code>docs.ss</code> provides three operations:
|
|
<menu>
|
|
<li> <code>{(idx atom?)} : SchemeValue -> bool</code>
|
|
<br> which determines whether or not a
|
|
Scheme value is a number, a symbol, or a string; <br>
|
|
Note: This notion of atom is different from that in the compat.ss library.
|
|
|
|
<li> <code>{(idx annotation?)} : SchemeValue -> bool</code>
|
|
<br> which determines whether or not a
|
|
Scheme symbol is a document annotation;
|
|
|
|
<li> <code>{(idx end-annotation)} : annotation -> annotation</code>
|
|
<br>which consumes an annotation and
|
|
produces a matching ending; and
|
|
|
|
<li> <code> {(idx write-file)} : (list-of atom) [string]-> void <code>
|
|
<br> which consumes a list of annotated symbols
|
|
and prints them out as a "file"; it returns nothing.
|
|
if the string argument is present, it is interpreted as a file name:
|
|
the words are written to this file; if the file exists, it is deleted
|
|
</menu>
|
|
|
|
<p>Sample session: set teachpack to <code>docs.ss</code> and execute:
|
|
<pre>
|
|
> (annotation? 0)
|
|
#f
|
|
> (annotation? '<bold>)
|
|
#t
|
|
> (end-annotation 0)
|
|
end-annotation: not an annotation: 0
|
|
> (write-file (list 'a 'b))
|
|
a b
|
|
</pre>
|
|
|
|
{(include "foot.tinc")}
|