home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / pcscheme / geneva / pcscheme.exe / DOC / REFCARD.TEX (.txt) < prev    next >
Encoding:
LaTeX Document  |  1994-01-03  |  52.7 KB  |  1,175 lines

  1. %* REFCARD.TEX
  2. %************************************************************************
  3. %*                                                                      *
  4. %*                  PC Scheme/Geneva 4.00 TeX code                      *
  5. %*                                                                      *
  6. %* (c) 1985-1988 by Texas Instruments, Inc. See COPYRIGHT.TXT           *
  7. %* (c) 1993 by L. Bartholdi & M. Vuilleumier, University of Geneva      *
  8. %*                                                                      *
  9. %*----------------------------------------------------------------------*
  10. %*                                                                      *
  11. %*                     A Reference card for PCS                         *
  12. %*                                                                      *
  13. %*----------------------------------------------------------------------*
  14. %*                                                                      *
  15. %* Created by: Larry Bartholdi                    Date: 19931023        *
  16. %* Revision history:                                                    *
  17. %* - 18 Jun 92:    Renaissance (Borland Compilers, ...)                    *
  18. %*                                                                      *
  19. %*                                    ``In nomine omnipotentii dei''    *
  20. %************************************************************************
  21. \documentstyle[multicol,ps2]{article}
  22. \pagestyle{empty}
  23. \setlength{\topmargin}{-2cm}
  24. \setlength{\oddsidemargin}{-2.2cm}
  25. \setlength{\textheight}{21cm}
  26. %**********
  27. %\setlength{\textwidth}{29.3cm}
  28. \setlength{\textwidth}{39.2cm}
  29. %**********
  30. \setlength{\unitlength}{1cm}
  31. \setlength{\multicolsep}{0cm}
  32. \font\manfnt=manfnt scaled 800    % with the dangerous bend sign
  33. \chardef\bendchar="7F
  34. \newcommand{\bend}{{\manfnt\bendchar}}
  35. \newlength{\entlength}
  36. \newlength{\arrowlead}
  37. \setlength{\arrowlead}{-1.5mm}
  38. \newcommand{\entfont}{\tt}
  39. \newcommand{\ent}[2]{\makebox[\entlength][l]{{\entfont #1}}#2\\}
  40. \newcommand{\res}[2]{\makebox[\entlength][l]{{\entfont
  41.     #1}}\hspace{\arrowlead}$\Longrightarrow$\hspace{2mm}#2\\}
  42. \newcommand{\mess}[3]{\makebox[\entlength][l]{\symb{{#1}} \argt{{#2}}}#3\\}
  43. \newcommand{\mres}[3]{{\addtolength{\entlength}{\arrowlead}%
  44.     \makebox[\entlength][l]{\symb{{#1}}
  45.         \argt{{#2}}\dotfill}$\Rightarrow$\hspace{2mm}{#3}\\}}
  46. \newcommand{\mval}[2]{{\addtolength{\entlength}{\arrowlead}%
  47.     \makebox[\entlength][l]{\symb{{#1}}
  48.         \opt{new-value}\dotfill}$\Rightarrow$\hspace{2mm}{#2}\\}}
  49. \newcommand{\alt}[1]{{\sc Alt-#1}}
  50. \newcommand{\argt}[1]{{\mediumseries\rm\it #1}\/}
  51. \newcommand{\fq}[1]{$\langle${\mediumseries\rm\it #1}$\rangle$}
  52. \newcommand{\ctrl}[1]{{\sc Ctrl\kern1pt-#1}}
  53. \newcommand{\keypad}[1]{\fq{{\sc Keypad #1}}}
  54. \newcommand{\meta}[1]{{\sc Meta\kern1pt-#1}}
  55. \newcommand{\note}[1]{\hspace{1cm}\parbox{80mm}{\raggedright #1}\\}
  56. \newcommand{\opt}[1]{{\mediumseries\rm{\normalshape [}\argt{#1}{\normalshape ]}}}
  57. \newcommand{\Opt}[1]{{\mediumseries\rm\normalshape [}#1{\mediumseries\rm\normalshape ]}}
  58. \newcommand{\shift}[1]{{\sc Shift-#1}}
  59. \newcommand{\symb}[1]{{\it\tt '#1}}
  60. \newcommand{\TeXcmd}[1]{{\tt\char92 #1}}
  61. \newcommand{\Proc}[1]{$\lambda${\rm\normalshape ({\rm\it #1}\/)}}
  62. \newcommand{\List}[1]{{\tt\normalshape ({\rm\it #1}\/)}}
  63. \newcommand{\IND}[2]{$\mbox{#1}_{#2}$}
  64. \newcommand{\OBJ}{\argt{obj}}
  65. \newcommand{\CHAR}{\argt{char}}
  66. \newcommand{\CLAS}{\argt{class}}
  67. \newcommand{\LIST}{\argt{list}}
  68. \newcommand{\PAIR}{\argt{pair}}
  69. \newcommand{\STR}{\argt{string}}
  70. \newcommand{\SYM}{\argt{symbol}}
  71. \newcommand{\NUM}{\argt{number}}
  72. \newcommand{\INT}{\argt{integer}}
  73. \newcommand{\VECT}{\argt{vector}}
  74. \newcommand{\ENV}{\argt{env}}
  75. \newcommand{\PORT}{\argt{port}}
  76. \newcommand{\WIN}{\argt{window}}
  77. \newcommand{\OP}{\opt{port}}
  78. \newcommand{\nth}{$n^{\mbox{\tiny th}}$}
  79. \newcommand{\markup}{\noindent\begin{picture}(0,0)(0.34,-0.9)
  80.     \thinlines
  81.     \multiput(9.9,0)(9.9,0){3}{\line(0,-1){0.6}}
  82.     \multiput(9.9,-21)(9.9,0){3}{\line(0,1){0.6}}
  83.     \put(0,0){\line(1,0){39.6}\line(0,-1){21}}
  84.     \put(39.6,-21){\line(-1,0){39.6}\line(0,1){21}}
  85.     \end{picture}}
  86. \newcommand{\notice}{{\bf\large {\Large PCS/G}ENEVA {\Large R}EFERENCE} \\
  87.     Version~4.02---\copyright 1993 Larry Bartholdi, Marc Vuilleumier \\
  88.     E-Mail: {\tt schemege@cui.unige.ch} --- FTP: {\tt cui.unige.ch:pub/pcs}}
  89. \newenvironment{acculade}[1]%
  90.     {\begingroup\def\tail{#1}%
  91.         \dimen0=-\baselineskip
  92.         $\mathsurround=-1pt \left.\begin{tabular}{@{}l@{}l@{}}
  93.         \hspace{\entlength} & \\[\dimen0]}%
  94.     {\end{tabular}\right\}$\relax\tail\\ \endgroup}
  95. \begin{document}
  96. \special{! statusdict begin a3tray end}
  97. \frenchspacing
  98. \footnotesize
  99. \setlength{\topmargin}{-2.4cm}
  100. %**********
  101. %\begin{multicols}{3}
  102. \begin{multicols}{4}
  103. %**********
  104. \markup
  105. \raggedright\raggedcolumns
  106. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  107. %============================================================ EDWIN #1
  108. \notice
  109. \section*{Edwin: the Traditional Editor}
  110. \setlength{\entlength}{3cm}
  111. \renewcommand{\entfont}{\rm}
  112. {\tt Edwin} is a sophisticated editor using {\sc Emacs}' key sequences\\[1mm]
  113. \ent{\tt (edwin)}{starts the editor}
  114. \ent{\tt (remove-edwin)}{forgets the editor}
  115. \ent{\tt (edwin-reset-lines)}{resets the console to full-screen}
  116. \meta{} can be {\sc Escape} or \ctrl Z.\\
  117. \begin{center}
  118. \begin{tabular}{lll}
  119.     & {\bf Next}    & {\bf Previous} \\ \hline\rule{0pt}{2.5ex}%
  120. Character    & \ctrl F    & \ctrl B \\
  121. Word    & \meta F    & \meta B \\
  122. Line        & \ctrl N    & \ctrl P \\
  123. Sentence    & \meta A    & \meta E \\
  124. Paragraph    & \meta{]}    & \meta{[} \\
  125. Screen    & \ctrl V    & \meta V \\
  126. List    & \meta{\ctrl N}    & \meta{\ctrl P} \\
  127. S-Expr    & \meta{\ctrl F}    & \meta{\ctrl B} \\[3mm]
  128.     & {\bf Last}    & {\bf First} \\ \hline\rule{0pt}{2.5ex}%
  129. Line    & \meta{>}    & \meta{<} \\
  130. \end{tabular}
  131. \end{center}
  132. \subsection*{Mark Commands}
  133. \ent{\ctrl @}{set a mark}
  134. \ent{\meta @}{mark a word}
  135. \ent{\meta{\ctrl @}}{mark a Scheme expression}
  136. \ent{\meta H}{mark the whole paragraph}
  137. \ent{\ctrl X H}{mark the whole buffer}
  138. \ent{\ctrl X \ctrl X}{exchange current position and mark}
  139. \subsection*{Kill/Unkill Commands}
  140. \ent{\sc Backspace}{delete the character before the cursor}
  141. \ent{\ctrl D}{delete the character at the cursor}
  142. \ent{\meta{$\backslash$}}{delete all spaces \& tabs around the point}
  143. \ent{\meta{\sc Space}}{delete all spaces \& tabs except one}
  144. \ent{\meta D}{kill the next word}
  145. \ent{\meta{\sc Backspace}}{kill the previous word}
  146. \ent{\ctrl K}{kill till end of line}
  147. \ent{\meta K}{kill till end of sentence}
  148. \ent{\ctrl X \sc Backspace}{kill backward to begin of sentence}
  149. \ent{\meta{\ctrl K}}{kill next Scheme expression}
  150. \ent{\ctrl W}{kill a region}
  151. \ent{\meta W}{copy a region}
  152. \ent{\ctrl Y}{yank back a kill}
  153. \ent{\meta Y}{unkill using previous kill ring entry}
  154. \ent{\meta{\ctrl W}}{append next kill to preceding kill}
  155. \ent{\ctrl X \ctrl K}{expunge kill ring entry}
  156. \vfill
  157. %============================================================ EDWIN #2
  158. \subsection*{File Commands}
  159. \ent{\ctrl X \ctrl V}{visit a file}
  160. \ent{\ctrl X \ctrl S}{save the buffer}
  161. \ent{\ctrl X \ctrl W}{write the buffer}
  162. \ent{\ctrl X \ctrl I}{insert a file}
  163. \ent{\ctrl X \ctrl P}{put a region to a file}
  164. \ent{\ctrl X \ctrl Q}{toggle read-only flag}
  165. \ent{\meta{$\tilde{}$}}{ignore changes made to the buffer}
  166. \subsection*{Breaking \& Indenting}
  167. \ent{\ctrl O}{open the line}
  168. \ent{\sc Return}{insert a line break}
  169. \ent{\ctrl J}{insert a line break and indent}
  170. \ent{\sc Tab}{indent the line (according to Scheme syntax)}
  171. \ent{\meta{\ctrl Q}}{indent the next Scheme expression}
  172. \subsection*{Miscellaneous}
  173. \ent{\ctrl S}{search forward incrementally}
  174. \ent{\ctrl R}{search backward incrementally}
  175. \ent{\ctrl X \ctrl M}{toggle Fundamental/Scheme mode}
  176. \ent{\ctrl X !}{toggle full/split screen}
  177. \vspace{1mm}
  178. \ent{\meta{\ctrl Z}}{evaluate the mark}
  179. \ent{\meta{\ctrl X}}{evaluate the next Scheme expression}
  180. \ent{\meta O}{evaluate the buffer}
  181. \ent{\ctrl X \ctrl Z}{suspend {\tt edwin}}
  182. \ent{\ctrl X \ctrl C}{exit the editor}
  183. \ent{\ctrl L}{redraw the screen}
  184. \ent{\ctrl U}{repeat a command}
  185. \ent{\ctrl G}{abort the current command}
  186. \ent{\ctrl Q}{quote the next character}
  187. \ent{\ctrl T}{transpose (swap the last two characters)}
  188. \subsection*{Inside {\mediumseries\tt (\%system-file-name "EDWIN.INI")}}
  189. \setlength{\entlength}{5cm}
  190. \renewcommand{\entfont}{\tt}
  191. \ent{(set-edwin-key \argt{key} \argt{handler})}{define a new sequence}
  192. \ent{(remap-edwin-key \argt{new-key} \argt{old-key})}{define an alias sequence}
  193. \vspace{1mm}
  194. Here \argt{key} can be a character or a list of characters.\\
  195. Predefined chars are {\tt meta-char}, {\tt alt-char}, {\tt ctrl-x-char} and
  196. {\tt ctrl-z-char}.
  197. \vspace{2cm}
  198. \vfill
  199. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  200. %============================================================ ED #1
  201. \section*{Ed: a Generic Editor}
  202. \setlength{\entlength}{4.2cm}
  203. \renewcommand{\entfont}{\tt}
  204. {\tt Ed} is an editor toolkit using a subset of {\sc Brief}'s key sequences\\[1mm]
  205. {\setlength{\entlength}{5.7cm}
  206. \res{(make-editor \opt{window} \opt{\symb{EXIT-FREELY}})}{a basic editor object}
  207. \res{(make-enhanced-editor \ldots)}{ditto, with additional features}
  208. \res{(make-color-editor \ldots)}{ditto, with block highlight}
  209. \res{(make-scheme-editor \ldots)}{ditto, with scheme-specific rules}
  210. \vspace{2mm}
  211. Examples:\\
  212. \setlength{\entlength}{5.4cm}
  213. \ent{(define ed (make-\opt{\ldots {\tt-}}editor))}
  214. {; create a full-screen editor}
  215. \ent{(ed \symb{REMAP-KEY} 27 \symb{@GOTO-LINE})}
  216. {; remap {\rm\sc Esc} to ''go to line''}
  217. \ent{(ed \opt{filename})}
  218. {; open the editor}
  219. \vspace{1mm}
  220. To create a multi-window editor, define two or more editors in different
  221. windows; scrapbook and keystroke assignements will be shared by all.
  222. \subsection*{Basic Editor Commands}
  223. \newlength{\lrudarrowsize}
  224. \settowidth{\lrudarrowsize}{$\leftrightarrow$}
  225. \setlength{\fboxsep}{1.5pt}
  226. \newcommand{\keyit}[1]{\fbox{#1}}
  227. \newcommand{\sizeup}[1]{\makebox[\lrudarrowsize][c]{#1}}
  228. \newcommand{\lrudarrow}{\sizeup{%
  229.     \makebox[0mm][c]{$\leftrightarrow$}%
  230.     \makebox[0mm][c]{$\updownarrow$}}}
  231. \vspace{1mm}
  232. \begin{tabular}{rclrcl}
  233. \multicolumn{1}{l}{\makebox[18mm][l]{{\bf Step}}}    &
  234. \keyit{$\uparrow$} & \makebox[10mm][l]{} & \multicolumn{1}{l}{\makebox[18mm][l]{{\bf Jump}}}    & \sizeup{{\sc PgUp}} \\
  235. \keyit{$\leftarrow$} & \lrudarrow        & \keyit{$\rightarrow$}    & \ctrl{\keyit{$\leftarrow$}}    & \lrudarrow & \ctrl{\keyit{$\rightarrow$}} \\
  236.                     & \keyit{$\downarrow$}    &                        &                    & \sizeup{{\sc PgDn}} \\[3mm]
  237. \multicolumn{1}{l}{{\large$\mathbf\infty$}} & \sizeup{\ctrl{\sc PgUp}} &    & \multicolumn{1}{l}{{\bf Delete}} \\
  238. {\sc Home}            & \lrudarrow            & {\sc End}                & {\sc BackSpace}    & \lrudarrow & {\sc Del} \\
  239.                     & \sizeup{\ctrl{\sc PgDn}} \\
  240. \end{tabular}
  241. \vspace{2mm}
  242. \setlength{\entlength}{2.2cm}
  243. \renewcommand{\entfont}{\rm}
  244. \ent{\alt I}{toggle \underline insert/overwrite mode}
  245. \ent{\alt G}{\underline go to line}
  246. \ent{\alt K}{\underline kill to end of line}
  247. \ent{\alt D}{\underline delete current line}
  248. \ent{\ctrl L}{refresh display}
  249. \ent{\sc F7}{record a keystroke sequence}
  250. \ent{\sc F8}{replay a keystroke sequence}
  251. \ent{\sc F10}{execute a command by name}
  252. \vspace{1mm}
  253. \ent{\alt E}{\underline edit another file}
  254. \ent{\alt W}{\underline write file to disk}
  255. \ent{\alt O}{choose new \underline output name}
  256. \ent{\alt R}{\underline read a file into current}
  257. \ent{\alt X}{e\underline xit editor}
  258. \subsection*{Enhanced Editor Commands}
  259. Use a Color Editor if you want block highlight features.\\[1mm]
  260. \ent{\alt M}{\underline mark block}
  261. \ent{\alt L}{\underline line block}
  262. \ent{\alt C}{\underline column block}
  263. \ent{\keypad{$-$}}{cut block/line to scrap}
  264. \ent{\keypad{$+$}}{copy block/line to scrap}
  265. \ent{\keypad{$/$}}{invert block bounds (swap anchor)}
  266. \ent{\sc Ins}{insert scrap into text}
  267. \ent{\sc Del}{delete block}
  268. \ent{\alt W}{\underline write block/file to disk}
  269. \vspace{1mm}
  270. \ent{\alt{{\normalshape [}$1\ldots 3${\normalshape ]}}}{drop a bookmark}
  271. \ent{\alt J {\normalshape [}$1\ldots 3${\normalshape ]}}{\underline jump to bookmark}
  272. \ent{\ctrl R}{\underline replicate a command}
  273. \vspace{1mm}
  274. \ent{\ctrl{\sc F5}}{toggle case sensivity}
  275. \ent{\alt S or {\sc F5}}{\underline search string}
  276. \ent{\shift{\sc F5}}{repeat previous search}
  277. \ent{\alt T or {\sc F6}}{\underline translate string}
  278. \ent{\shift{\sc F6}}{repeat previous translate}
  279. \vfill
  280. %============================================================ ED #2
  281. \subsection*{Scheme Editor Commands}
  282. Autoindent is active and color changes on each parenthesis level.\\[1mm]
  283. \ent{\ctrl A}{enlarge mark around Scheme expression}
  284. \ent{\ctrl Z}{mark the biggest Scheme expression}
  285. \ent{\ctrl{\sc F10}}{evaluate marked expression}
  286. \ent{\alt{\sc F10}}{evaluate current file}
  287. \ent{\sc Tab}{complete symbol or reindent line/block}
  288. \ent{\shift{\sc Tab}}{prepare to add a comment}
  289. \ent{\alt Q \fq{key}}{use \argt{key}'s basic definition}
  290. \subsection*{Driving an Editor}
  291. \setlength{\entlength}{4.2cm}
  292. {\tt Ed} is assumed to be an instance of an appropriate editor.\\[1mm]
  293. \setlength{\entlength}{4.5cm}
  294. \renewcommand{\entfont}{\tt}
  295. \ent{(ed \opt{message} \opt{arguments})}{\argt{message} defaults to
  296. \symb{OPEN}}
  297. \vspace{1mm}
  298. \mess{OPEN}{\opt{filename}}{pop-up the editor, handle commands}
  299. \mess{SAFE}{}{ensure current buffer is saved}
  300. \mess{CLEAR}{}{clear buffer}
  301. \mval{NAME}{name of buffer}
  302. \mval{BUFFER}{a list of strings}
  303. \mval{POSITION}{cursor position}
  304. \mval{INSERT}{{\tt \#F} when in overwrite mode}
  305. \mval{TAB}{tab expansion width}
  306. \mval{TABULIZE-MODE}{\symb{COMPRESS}, \symb{NORMAL} or \symb{EXPAND}}
  307. \mval{SEPARATORS}{string (used for word move)}
  308. \mval{CASE-SENSIVITY}{{\tt \#F} when disabled}
  309. \mval{COLORS}{associative color list}
  310. \mval{COMMENT-COLUMN}{column \#}
  311. \mval{INDENT-TOKENS}{list of special tokens}
  312. \mval{INPUT-PORT}{port used for input}
  313. \mess{DO-STRING}{string}{feed editor with keystrokes}
  314. \mres{READ-ACTION}{}{an \argt{action}: the next event}
  315. \mess{HANDLE-ACTION}{action}{process one command}
  316. \mess{REMAP-KEY}{key function}{}
  317. \note{\argt{key} is {\tt (list* \opt{\ldots\ {\sc Ascii}$_2$} 
  318.     \argt{{\sc Ascii}$_1$})}}
  319. \note{\argt{function} if {\tt (list* \opt{\List{context action} \ldots} 
  320.     \argt{default-action})}}
  321. \note{\argt{context} is \Proc{ed} $\longrightarrow$ boolean}
  322. \note{\argt{action} is a character, a string, or a symbol:}
  323. \hbox{\hspace{3mm}\vrule
  324. \setlength{\tabcolsep}{0mm}
  325. \begin{tabular}{lll}
  326. \makebox[3cm][l]{\symb{@LEFT}} &
  327. \makebox[3cm][l]{\symb{@WORD-LEFT}} &
  328. \makebox[3cm][l]{\symb{@HOME}} \\
  329. \symb{@RIGHT} &
  330. \symb{@WORD-RIGHT} &
  331. \symb{@END} \\
  332. \symb{@UP} &
  333. \symb{@PAGE-UP} &
  334. \symb{@TOP-OF-BUFFER} \\
  335. \symb{@DOWN} &
  336. \symb{@PAGE-DOWN} &
  337. \symb{@END-OF-BUFFER} \\
  338. \symb{@DEL} &
  339. \symb{@DELETE-TO-EOL} &
  340. \symb{@DELETE-LINE} \\
  341. \symb{@BACKSPACE} &
  342. \symb{@TAB} &
  343. \symb{@ENTER} \\
  344. \symb{@QUOTE} \\[1mm]
  345. \symb{@INSERT-MODE} &
  346. \symb{@GOTO-LINE} &
  347. \symb{@REFRESH} \\
  348. \symb{@RECORD} &
  349. \symb{@PLAY} &
  350. \symb{@EXECUTE} \\
  351. \symb{@LOAD} &
  352. \symb{@READ-INTO} &
  353. \symb{@WRITE} \\
  354. \symb{@RENAME} &
  355. \symb{@EXIT} \\[1mm]
  356. \symb{@SEARCH} &
  357. \symb{@REPEAT-SEARCH} &
  358. \symb{@CASE-SENSITIVITY} \\
  359. \symb{@TRANSLATE} &
  360. \symb{@REPEAT-TRANSLATE} &
  361. \symb{@REPLICATE} \\
  362. \symb{@BOOKMARK-\opt{{\bf 1\ldots3}}} &
  363. \symb{@JUMP-TO-\opt{{\bf 1\ldots3}}} \\[1mm]
  364. \symb{@MARK-BLOCK} &
  365. \symb{@LINE-BLOCK} &
  366. \symb{@COLUMN-BLOCK} \\
  367. \symb{@CUT-BLOCK} &
  368. \symb{@COPY-BLOCK} &
  369. \symb{@INSERT-BLOCK} \\
  370. \symb{@CANCEL-BLOCK} &
  371. \symb{@SWAP-ANCHOR} \\[1mm]
  372. \symb{@MARK-EXPR} &
  373. \symb{@MARK-DEF} &
  374. \symb{@SCHEME-PARENTHESIS} \\
  375. \symb{@COMPLETION} &
  376. \symb{@INDENT} &
  377. \symb{@COMMENT} \\
  378. \symb{@EVAL} &
  379. \symb{@EVAL-BLOCK} &
  380. \symb{@SCHEME-ENTER} \\
  381. \end{tabular}
  382. \vfill\newpage
  383. \setlength{\topmargin}{-2cm}
  384. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  385. %============================================================ BGI #1
  386. \section*{\markup BGI: the Graphics Package}
  387. \setlength{\entlength}{4.5cm}
  388. \renewcommand{\entfont}{\tt}
  389. Points and distances are represented as pairs. \\
  390. The X-- and Y--components can be arbitrary numbers.\\[1mm]
  391. \ent{(set-world!\ \argt{upper-left-point} \argt{lower-right-point})}{}
  392. \subsection*{Control System}
  393. \ent{(init-graph \opt{driver \opt{mode \opt{BGI-path}}})}{}
  394.     \note{\argt{driver} is \symb{DETECT}, \symb{CGA}, \symb{MCGA},
  395.     \symb{EGA}, \symb{EGA64}, \symb{EGAMONO}, \symb{IBM8514}, \symb{HERCMONO},
  396.     \symb{ATT400}, \symb{VGA} or \symb{PC3270}}
  397. \ent{(set-write-mode \argt{wmode})}{\argt{wmode} is \symb{COPY} or \symb{XOR}}
  398. \ent{(restore-crt-mode)}{}
  399. \ent{(set-graph-mode \opt{mode})}{}
  400. \ent{(close-graph)}{}
  401. \ent{(graph-defaults)}{}
  402. \ent{(detect-graph)}{}
  403. \ent{(get-mode-range \opt{driver})}{}
  404. \ent{(get-graph-mode)}{}
  405. \res{(install-user-driver \argt{name})}{a symbol (\argt{driver})}
  406.     \note{\argt{name} is a string (filename without extension)}
  407. \ent{(install-user-font \argt{name})}{a symbol (\argt{font})}
  408. \subsection*{Drawing}
  409. \setlength{\entlength}{3.6cm}
  410. \ent{(line \argt{start-point} \argt{end-point})}{}
  411. \ent{(rectangle \argt{upper-left-point} \argt{lower-right-point})}{}
  412. \ent{(draw-poly \argt{list-of-points})}{}
  413. \ent{(circle \argt{center-point} \argt{radius})}{}
  414. \ent{(arc \argt{center-point} \argt{start-angle} \argt{end-angle} \argt{radius})}{}
  415. \ent{(ellipse \argt{center-point} \argt{start-angle} \argt{end-angle} \argt{distances})}{}
  416. \res{(get-arc-coords)}{\List{\argt{center-point} \argt{start-point} \argt{end-point}}}
  417. \ent{(get-aspect-ratio)}{}
  418. {\setlength{\entlength}{4cm}
  419. \ent{(set-aspect-ratio \argt{factor})}{sets circles' and arcs' x--y aspect}
  420. \ent{}{\argt{factor} is a fraction, passed as a pair}
  421. \ent{(get-line-settings)}{}
  422. \ent{(set-line-style \argt{line-style} \argt{user-pattern} \argt{thickness})}{}
  423.     \note{\argt{line-style} is \symb{SOLID}, \symb{CENTER}, \symb{DOTTED}, \symb{DASHED} or \symb{USER-BIT}\\
  424.     \argt{thickness} is \symb{NORMAL} (1), \symb{THICK} (3) or an integer}
  425. \ent{(move-to \argt{point})}{{\tt (move-rel \argt{distances})}}
  426. \ent{(line-to \argt{point})}{{\tt (line-rel \argt{distances})}}
  427. \subsection*{Filling}
  428. \ent{(flood-fill \argt{start-point} \argt{stop-color})}{}
  429. \ent{(bar \argt{upper-left-point} \argt{lower-right-point})}{}
  430. \ent{(bar-3d \argt{upper-left-point} \argt{lower-right-point} \argt{depth} \argt{draw-a-top?})}{}
  431. \ent{(fill-poly \argt{list-of-points})}{}
  432. \ent{(fill-ellipse \argt{center-point} \argt{distances})}{}
  433. \ent{(pie-slice \argt{center-point} \argt{start-angle} \argt{end-angle} \argt{radius})}{}
  434. \ent{(sector \argt{center-point} \argt{start-angle} \argt{end-angle} \argt{distances})}{}
  435. \res{(get-fill-settings)}{\List{\argt{fill-style} \argt{color}}}
  436. \ent{(set-fill-style \argt{fill-style} \argt{color})}{}
  437.     \note{\argt{fill-style} is \symb{EMPTY}, \symb{SOLID}, \symb{LINE},
  438.     \symb{[LT][BK]SLASH},
  439.     \symb{HATCH}, \symb{XHATCH}, \symb{INTERLEAVE}, \symb{CLOSE-DOT} or
  440.     \symb{WIDE-DOT}}
  441. \res{(get-fill-pattern)}{\List{\argt{fill-pattern} \argt{color}}}
  442. \ent{(set-fill-pattern \argt{fill-pattern} \argt{color})}{}
  443.     \note{\argt{fill-pattern} is a list of integers}
  444. \vfill
  445. %============================================================ BGI #2
  446. \subsection*{Bitmapping}
  447. \res{(get-pixel \argt{point})}{\argt{color}}
  448. \ent{(put-pixel \argt{point} \argt{color})}{}
  449. {\setlength{\entlength}{6.6cm}
  450. \res{(get-image \argt{upper-left-point} \argt{lower-right-point})}{a binary string}
  451. \ent{(put-image \argt{new-upper-left-point} \argt{image-string} \argt{put-mode})}{}
  452.     \note{\argt{put-mode} is \symb{COPY}, \symb{XOR}, \symb{OR}, 
  453.     \symb{AND}, or \symb{NOT}} 
  454. \ent{(image-size \argt{upper-left-point} \argt{lower-right-point})}{}
  455. \res{(get-view-settings)}{\List{\argt{ul-point} \argt{lr-point} \argt{clip?}}}
  456. \ent{(set-viewport \argt{upper-left-point} \argt{lower-right-point} \argt{clip?})}{}
  457. \ent{(clear-viewport)}{}
  458. \ent{(clear-device)}{}
  459. \ent{(set-active-page \argt{page})}{}
  460. \ent{(set-visual-page \argt{page})}{}
  461. \subsection*{Writing Text}
  462. \ent{(out-text-xy \argt{start-point} \argt{text-string})}{}
  463. \ent{(out-text \argt{text-string})}{}
  464. \res{(get-text-settings)}{\List{\argt{font} \argt{direction} \argt{size} \argt{horiz-just} \argt{vert-just}}}
  465. \ent{(set-text-style \argt{font} \argt{direction} \argt{size})}{}
  466.     \note{\argt{font} is \symb{DEFAULT}, \symb{TRIPLEX}, \symb{SMALL},
  467.     \symb{SANS-SERIF}, \symb{GOTHIC}, \symb{SCRIPT}, \symb{SIMPLEX},
  468.     \symb{TRIPLEX-SCR}, \symb{COMPLEX}, \symb{EUROPEAN} or \symb{BOLD}\\
  469.     \argt{direction} is \symb{HORIZ} or \symb{VERT}\\
  470.     \argt{size} is an integer between 1 and 10, or 0 for default}
  471. \ent{(set-text-justify \argt{horiz-just} \argt{vert-just})}{}
  472.     \note{\argt{horiz-just} is \symb{LEFT}, \symb{CENTER} or \symb{RIGHT}\\
  473.     \argt{vert-just} is \symb{BOTTOM}, \symb{CENTER} or \symb{TOP}}
  474. \ent{(set-user-char-size \argt{x-ratio} \argt{y-ratio})}{}
  475. \res{(text-size \argt{text-string})}{a distance}
  476. \subsection*{Using Color}
  477. \setlength{\entlength}{4.5cm}
  478. Predefined colors are:\\[1mm]
  479. \hbox{\hspace{3mm}\vrule
  480. \begin{tabular}{l@{\hspace{0.5cm}}l@{\hspace{0.5cm}}l}
  481. \symb{BLACK} (0) &    \symb{BROWN} (6) &        \symb{LIGHT-CYAN} (11) \\
  482. \symb{BLUE} (1) &    \symb{LIGHT-GRAY} (7) &    \symb{LIGHT-RED} (12) \\
  483. \symb{GREEN} (2) &    \symb{DARK-GRAY} (8) &    \symb{LIGHT-MAGENTA} (13) \\
  484. \symb{CYAN} (3) &    \symb{LIGHT-BLUE} (9) &    \symb{YELLOW} (14) \\
  485. \symb{RED} (4) &    \symb{LIGHT-GREEN} (10) & \symb{WHITE} (15) \\
  486. \symb{MAGENTA} (5)    & &
  487. \end{tabular}
  488. \vspace{1mm}
  489. \ent{(get-color)}{{\tt (get-bk-color)}}
  490. \ent{(set-color \argt{color})}{{\tt (set-bk-color \argt{color})}}
  491. \ent{(get-max-color)}{}
  492. \ent{(get-palette-size)}{}
  493. \ent{(get-palette)}{{\tt (get-default-palette)}}
  494. \ent{(set-palette \argt{entry} \argt{color})}{}
  495. \ent{(set-rgb-palette \argt{entry} \argt{red} \argt{green} \argt{blue})}{}
  496. \ent{(set-all-palette \argt{color-list})}{}
  497. \subsection*{Miscellaneous}
  498. \ent{(get-xy)}{{\tt (get-max-xy)}}
  499. \ent{(get-driver-name)}{{\tt (get-mode-name \argt{mode})}}
  500. \ent{(get-max-mode)}{}
  501. \ent{(graph-error-msg \argt{error-id})}{}
  502. \ent{(graph-result)}{}
  503. \vfill
  504. %============================================================ BGI #3
  505. \subsection*{Hershey Fonts}
  506. This package is an enhanced alternative to {\tt out-text}, providing\\
  507. various special symbols, types and alphabets as well as a subset of \TeX.\\[1mm]
  508. \newcommand{\BULLET}{\makebox[0mm][r]{$\bullet$\hspace{0.5em}}}
  509. \ent{(load (\%system-file-name "HERSHEY.FSL"))}{}
  510. \ent{(out-hershey \argt{string} \opt{position})}{}
  511. \argt{position} is a \argt{point}\\
  512. \argt{string} is a sequence of any of:\\
  513. \note{\BULLET\TeXcmd{small}, \TeXcmd{large}, \TeXcmd{horiz}, \TeXcmd{vert},}
  514. \note{\BULLET{\tt\char92}\fq{font} or
  515.         {\tt\char92}\fq{font}\verb+@+\fq{scale}, where \fq{font} is:\\
  516.     \hbox{\hspace{3mm}\vrule
  517.     \begin{tabular}{llll}
  518.     {\bf small}& {\bf light}& {\bf bold} \\[1mm]
  519.     {\tt RM10} & {\tt RM2L} & {\tt RM2B} & {\rm Roman family}\\
  520.     {\tt SL10} & {\tt SL2L} & {\tt SL2B} & {\sl Slanted family}\\
  521.     {\tt SS10} & {\tt SS2L} & {\tt SS2B} & {\sf Sans-serif family}\\
  522.     {\tt GR10} & {\tt GR2L} & {\tt GR2B} &
  523.         {$\Gamma\rho\epsilon\epsilon\kappa$ family}\\[1mm]
  524.     {\tt AN20} & {\tt GO20} & {\tt OE20} & Antique, Gothic \& Old English\\
  525.     {\tt SY10} & {\tt SY20} & {\tt CY20} & Symbols \& Cyrillic\\
  526.     \end{tabular}}
  527.     and \fq{scale} is \INT\ or {\tt(\IND{\INT}{x},\IND{\INT}{y})},}
  528. \note{\BULLET plain text or symbols (e.g.\ ``\verb*+See note+\TeXcmd{\TeXcmd{dagger}}''),}
  529. \note{\BULLET grouping {\tt\{\}} to save/restore settings and delimit items,}
  530. \note{\BULLET {\tt\char94}\fq{item} or {\tt\char95}\fq{item} for super- or sub-scripts}
  531. \raisebox{8pt}{\bend} Beware that \verb+\+'s in strings must be doubled!
  532. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  533. \section*{Debugging Tools}
  534. \setlength{\entlength}{5cm}
  535. \renewcommand{\entfont}{\tt}
  536. In this section, \argt{proc} is a procedure to debug. \\[1mm]
  537. \ent{(break[-entry,-exit,-both] \argt{proc})}{{\tt break} $\equiv$ {\tt break-entry}}
  538.     \note{primes {\tt inspect}; binds {\tt *ARGS*}, {\tt *PROC*} and {\tt *RESULT*}}
  539. \ent{(unbreak[-entry,-exit] \argt{proc})}{{\tt unbreak} kills both breakpoints}
  540. \ent{(trace[-entry,-exit,-both] \argt{proc})}{{\tt trace} $\equiv$ {\tt trace-entry}}
  541. \ent{(untrace[-entry,-exit] \argt{proc})}{}
  542. \ent{(advise-entry \argt{proc} \argt{spy})}{\argt{spy} is \Proc{proc args env}}
  543. \ent{(advise-exit \argt{proc} \argt{spy})}{\argt{spy} is \Proc{proc args env retval}}
  544. \subsection*{The Inspector}
  545. \setlength{\entlength}{3cm}
  546. \renewcommand{\entfont}{\tt}
  547. \ent{(inspect)}{starts the inspector}
  548. \vspace{2mm}
  549. \setlength{\entlength}{1.8cm}
  550. \renewcommand{\entfont}{\rm}
  551. \ent{?}{display the command summary}
  552. \ent{!}{reset {\tt inspect}}
  553. \ent{\ctrl A}{display \underline all environment frame bindings}
  554. \ent{\ctrl B}{display prodecure call \underline backtrace}
  555. \ent{\ctrl C}{display the \underline current environment binding}
  556. \ent{\ctrl D}{move \underline down to callee's stack frame}
  557. \ent{\ctrl E}{\underline edit a variable's binding}
  558. \ent{\ctrl G}{\underline go (resume execution)}
  559. \ent{\ctrl I}{evaluate an expression \& \underline inspect the result}
  560. \ent{\ctrl L}{\underline list the current procedure}
  561. \ent{\ctrl M}{repeat the breakpoint \underline message}
  562. \ent{\ctrl P}{move to the \underline parent environment's frame}
  563. \ent{\ctrl Q}{\underline quit (reset to top-level)}
  564. \ent{\ctrl R}{\underline return from {\tt break} with a value}
  565. \ent{\ctrl S}{move to \underline son environment's frame}
  566. \ent{\ctrl U}{move \underline up to the caller's stack frame}
  567. \ent{\ctrl V}{e\underline valuate one expression in the current environment}
  568. \ent{\ctrl W}{\underline where (display the current stack frame)}
  569. \vfill
  570. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  571. %============================================================ MOUSE #1
  572. \section*{Using the Mouse}
  573. \setlength{\entlength}{4cm}
  574. \renewcommand{\entfont}{\tt}
  575. All calls are handled through a ``mouse'' object:
  576. \ent{\hspace{1cm}(mouse \argt{message} \opt{parameters}) $\Longrightarrow$
  577. \argt{result}}{}
  578. \vspace{-2mm}
  579. \begin{tabbing}
  580. Here \=\argt{button-set} is $\{\kern-2pt $\symb{LEFT} \symb{RIGHT} \symb{CENTER}$\kern2pt \}$\\
  581. \>\argt{button}${}\in{}$\argt{button-set}\\
  582. \>\argt{buttons-down}${}\subset{}$\argt{button-set}
  583. \end{tabbing}
  584. \vspace{-3mm}
  585. \begin{flushleft}
  586. \mess{RESET}{}{}
  587. \mess{SHOW}{}{}
  588. \mess{HIDE}{}{}
  589. \mres{INQ}{}{\List{buttons-down x y}}
  590. \mres{PRESS}{button}{\List{buttons-down press-count x y}}
  591. \mres{RELEASE}{button}{\List{buttons-down release-count x y}}
  592. \mess{MOVE}{x y}{}
  593. \mess{LIMITS 'HORIZONTAL}{$x_0$ $x_1$}{}
  594. \mess{LIMITS 'VERTICAL}{$y_0$ $y_1$}{}
  595. \mess{LIMITS 'BOTH}{$x_0$ $x_1$ $y_0$ $y_1$}{}
  596. {\setlength{\entlength}{5.5cm}
  597. \mess{SHAPE}{shape}{}
  598.     \note{\SYM\ or \List{x-hot-spot y-hot-spot and-mask xor-mask}}
  599. \mres{CURSOR}{symbol}{a cursor. Available cursors are:}
  600. \hbox{\hspace{3mm}\vrule
  601. \setlength{\tabcolsep}{0mm}
  602. \begin{tabular}{lllll}
  603. \makebox[1.5cm][l]{\symb{CENTER}} &
  604. \makebox[1.5cm][l]{\symb{LEFT}} &
  605. \makebox[1.5cm][l]{\symb{RIGHT}} &
  606. \makebox[1.5cm][l]{\symb{SMALL}} &
  607. \makebox[1.5cm][l]{\symb{ARROW}} \\
  608. \symb{UL-POINT} &
  609. \symb{UR-POINT} &
  610. \symb{LL-POINT} &
  611. \symb{LR-POINT} &
  612. \symb{HAND} \\
  613. \symb{KEYBOARD} &
  614. \symb{DISK} &
  615. \symb{STAR4} &
  616. \symb{STAR6} &
  617. \symb{TARGET} \\
  618. \symb{X} &
  619. \symb{CROSSHAIR} &
  620. \symb{CROSS} &
  621. \symb{MOVE} &
  622. \symb{BLOCK} \\
  623. \symb{CIRCLE} &
  624. \symb{EXCLAIM} &
  625. \symb{HOURGLAS} &
  626. \symb{CLOCK} &
  627. \symb{KITE} \\
  628. \symb{MESH} & 
  629. \symb{SQUARE} & 
  630. \symb{CALIPERS} &
  631. \symb{CRAYON} &
  632. \symb{ERASER} \\
  633. \symb{HAIRS} &
  634. \symb{HUMAN} &
  635. \symb{IBAR} &
  636. \symb{LASSO} &
  637. \symb{PAINTCAN} \\
  638. \symb{PENCIL} &
  639. \symb{PENCIL2} &
  640. \symb{PLIERS} &
  641. \symb{SWORD} &
  642. \symb{THE-BOOT} \\
  643. \symb{SCISSORS} &
  644. \symb{SCREWDRIVER}
  645. \end{tabular}
  646. \vspace{1mm}
  647. \mess{TEXT-TYPE 'SOFTWARE}{and-item xor-item}{}
  648.     \note{{\it and-item} and {\it xor-item} are \List{character .\ attribute}}
  649. \mess{TEXT-TYPE 'HARDWARE}{start-row end-row}{}
  650. {\setlength{\entlength}{5.3cm}
  651. \mess{SMOOTH}{\opt{\symb{CHECK} $\mid$\symb{ENABLE} $\mid$\symb{DISABLE}}}{%
  652.     {\sc Precise Point} services}
  653. \mval{HANDLER}{previous \argt{handler}}
  654.     \note{a {\it handler} is \List{events .\ proc}\\
  655.     {\it events}${}\in$ \List{\symb{MOVE} \symb{LEFT-DOWN} \symb{LEFT-UP}
  656.     \symb{LEFT} \symb{RIGHT-DOWN} \symb{RIGHT-UP} \symb{RIGHT}
  657.     \symb{CENTER-DOWN} \symb{CENTER-UP} \symb{CENTER} \symb{UP} \symb{DOWN}
  658.     \symb{BUTTONS}}}
  659.     \note{{\it proc} is \Proc{events buttons-down x y mickeys-x mickeys-y}}
  660. \mess{ENABLE}{}{\symb{DISABLE}}
  661. \mess{PEN-ON}{}{\symb{PEN-OFF}}
  662. \mess{EXCLUDE}{$x_0$ $y_0$ $x_1$ $y_1$}{}
  663. \mess{MICKEY-RATIO}{x y}{}
  664. \mess{SPEED-THRESHOLD}{speed}{}
  665. \mval{SENSITIVITY}{\List{x y speed}}
  666. \mres{MICKEYS}{}{\List{x y}}
  667. \note{relative movement. A Mickey is $\approx 1/200\mbox{in}$}
  668. \mval{POINTER-PAGE}{\argt{page}}
  669. \mval{INFORMATION}{\List{version type IRQ}}
  670.     \note{{\it type} is \symb{BUS}, \symb{SERIAL}, \symb{INPORT}, \symb{PS/2} or \symb{HP}}
  671. \mval{LANGUAGE}{\argt{language}}
  672.     \note{{\it language} is \symb{ENGLISH}, \symb{FRENCH},
  673.     \symb{DUTCH}, \symb{GERMAN}, \symb{SWEDISH}, \symb{FINNISH}, \symb{SPANISH},
  674.     \symb{PORTUGESE} or \symb{ITALIAN}}
  675. \mess{INTERRUPT-RATE}{rate}{\argt{rate} is \symb{NONE}, 30, 50, 100 200}
  676. \end{flushleft}
  677. \vfill\newpage
  678. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  679. %============================================================ SEMANTICS #1
  680. \markup\notice
  681. \section*{Semantics}
  682. \setlength{\entlength}{4.3cm}
  683. \renewcommand{\entfont}{\tt}
  684. \subsection*{Binding Forms}
  685. \ent{(lambda \argt{formals-list} \argt{exp} \ldots)}{}
  686. \ent{(named-lambda (\argt{name} \argt{formals}) \argt{exp} \ldots)}{}
  687. \ent{(rec \argt{label} \argt{exp})}{}
  688. \ent{(let[*,rec] \opt{label} ((\argt{var} \argt{value}) \ldots) \argt{exp} \ldots)}{}
  689. \begin{tabular}{@{}l@{}l}
  690. \tt (do{ } & ((\argt{var} \opt{init \opt{step}}) \ldots) \\
  691.     & (\argt{terminate?\ result-exp} \ldots) \\
  692.     & \argt{statement} \ldots)
  693. \end{tabular}}\\
  694. \subsection*{Fluid Environment}
  695. \ent{(fluid-bound?\ \argt{var})}{}
  696. \res{(fluid \argt{var})}{\argt{var}'s fluid binding}
  697. \ent{(fluid-lambda \argt{formals-list} \argt{exp} \ldots)}{}
  698. \ent{(fluid-let ((\argt{var} \argt{value}) \ldots) \argt{exp} \ldots)}{}
  699. \ent{(set-fluid!\ \argt{var} \argt{obj})}{changes a fluid binding}
  700. \subsection*{Literals}
  701. \ent{(quote \argt{pattern})}{$\equiv$ {\tt '(\argt{pattern})}}
  702. \ent{(quasiquote \argt{pattern})}{$\equiv$ {\tt `(\argt{pattern})}}
  703. \ent{(unquote \argt{expression})}{$\equiv$ {\tt ,(\argt{exp})}. Valid within {\tt quasiquote}}
  704. \ent{(unquote-splicing \argt{exp})}{$\equiv$ {\tt ,@(\argt{exp})}. Valid within {\tt quasiquote}}
  705. \subsection*{Sequencing \& Control}
  706. \setlength{\entlength}{4.7cm}
  707. \ent{(if \argt{predicate} \argt{consequent} \opt{alternative})}{}
  708. \ent{(when \argt{predicate} \argt{exp} \ldots)}{}
  709. \ent{(apply-if \argt{predicate} \Proc{trigger} \argt{exp-false})}{}
  710. \ent{(case \argt{item} (\argt{selector} \argt{exp} \ldots) \ldots\ \Opt{(else \argt{exp \ldots})})}{}
  711. \note{\argt{selector} is \argt{item-value} or \List{item-value \ldots}}
  712. \ent{(cond \argt{clause} \ldots\ \Opt{(else \argt{exp \ldots})})}{}
  713. \note{\argt{clause} is \List{predicate exp \ldots} or \List{predicate
  714.     {\tt\normalshape =>} \Proc{trigger}}}
  715. \res{(and \argt{exp} \ldots)}{value of last true \argt{exp}, or {\tt \#F}}
  716. \res{(or \argt{exp} \ldots)}{value of first true \argt{exp}, or {\tt \#F}}
  717. \ent{(not \argt{exp})}{}
  718. \res{(begin \IND{\argt{exp}}1 \ldots\ \IND{\argt{exp}}{n})}{\IND{\argt{exp}}n}
  719. \res{(begin0 \IND{\argt{exp}}1 \ldots\ \IND{\argt{exp}}{n})}{\IND{\argt{exp}}1}
  720. \subsection*{Syntax \& Errors}
  721. \ent{(alias \argt{new-name} \argt{old-name})}{}
  722. \ent{(syntax \argt{pattern} \argt{expansion})}{\argt{pattern} is a list structure}
  723. \ent{(define-integrable \argt{name} \argt{value})}{\argt{name} will be expanded inline}
  724. \ent{(macro \argt{name} \argt{expander})}{\argt{expander} is \Proc{exp}}
  725.     \note{if \argt{expander} is \symb{()}, \argt{name} is unaliased}
  726. \vspace{2mm}
  727. \ent{(assert \argt{predicate} \argt{message} \ldots)}{}
  728. \ent{(bkpt \argt{message} \argt{irritant-exp})}{}
  729. \ent{(error \argt{message} \argt{irritant-exp} \ldots)}{}
  730. \vfill
  731. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  732. %============================================================ OPERATORS #1
  733. \section*{Operators}
  734. \setlength{\entlength}{4.4cm}
  735. \renewcommand{\entfont}{\tt}
  736. \subsection*{Booleans}
  737. \ent{\makebox[1cm][l]{\#T}\makebox[1cm][l]{\#F}}{\symb{()}
  738.     is currently evaluated to {\tt \#F}}
  739. \ent{(boolean?\ \OBJ)}{}
  740. \subsection*{Equivalence Predicates}
  741. \ent{(eq?\ \IND\OBJ1 \IND\OBJ2)}{tests physical equality}
  742. \ent{(eqv?\ \IND\OBJ1 \IND\OBJ2)}{tests numbers, strings \& characters}
  743. \ent{(equal?\ \IND\OBJ1 \IND\OBJ2)}{tests visual appearances}
  744. \subsection*{Pairs \& Lists}
  745. \ent{\symb{()}}{the empty list}
  746. \ent{(pair?\ \OBJ)}{}
  747. \ent{(null?\ \OBJ)}{}
  748. \ent{(atom?\ \OBJ)}{$\equiv$ {\tt (not (pair?\ \OBJ))}}
  749. \res{(list?\ \OBJ)}{{\tt \#T} if \OBJ\ is \symb{()} or \List{\OBJ\ .\ \LIST}}
  750. \ent{(list->stream \LIST)}{}
  751. \ent{(list->string \LIST)}{}
  752. \ent{(list->vector \LIST)}{}
  753. \res{(implode \LIST)}{a symbol (built of \LIST's elements)}
  754. \ent{(append[!]\ \LIST\ \ldots)}{{\tt append!} alters all lists but the last}
  755. \ent{(apply \Proc{arg \ldots} \argt{argument-list})}{}
  756. \ent{([assoc,assq,assv] \OBJ\ \argt{pair-list})}{}
  757. \ent{(c[[a,d] \ldots]r \PAIR)}{up to 4 levels of ``{\tt a}'' and ``{\tt d}''}
  758. \ent{(cons \IND\OBJ1 \IND\OBJ2)}{}
  759. \ent{(copy \LIST)}{}
  760. \ent{([delete!,delq!]\ \OBJ\ \LIST)}{}
  761. \ent{(last-pair \LIST)}{}
  762. \ent{(length \LIST)}{}
  763. \ent{(list \OBJ\ \ldots)}{}
  764. \ent{(list* \OBJ\ \ldots)}{creates a dotted list}
  765. \ent{(list-ref \LIST\ \argt{index})}{\argt{index} starts at 0}
  766. \ent{(list-tail \LIST\ \argt{index})}{}
  767. \res{([member,memq,memv] \OBJ\ \argt{list})}{list-tail starting with \OBJ\ or
  768. {\tt \#F}}
  769. \ent{(reverse[!]\ \LIST)}{{\tt reverse!} destroys its argument}
  770. \ent{(set-c[a,d]r!\ \PAIR \OBJ)}{}
  771. \vspace{2mm}
  772. \ent{(for-each \Proc{arg \ldots} \LIST\ \ldots)}{calls \argt{proc} with an item of
  773. each list}
  774. \res{(map \Proc{arg \ldots} \LIST\ \ldots)}{list of resulting values}
  775. \subsection*{Streams: Lists Evaluating on Demand}
  776. \ent{THE-EMPTY-STREAM}{}
  777. \ent{(stream?\ \OBJ)}{}
  778. \ent{(empty-stream?\ \argt{stream})}{}
  779. \ent{(stream->list \argt{stream})}{}
  780. \ent{(cons-stream \IND\OBJ1 \IND\OBJ2)}{}
  781. \ent{(head \argt{stream})}{}
  782. \ent{(tail \argt{stream})}{}
  783. \ent{(delayed-object?\ \OBJ)}{}
  784. \ent{(delay \argt{exp})}{freezes and memoises \argt{exp}}
  785. \ent{(force \argt{delayed-object})}{}
  786. \ent{(freeze \argt{exp})}{}
  787. \ent{(thaw \argt{freezed-object})}{}
  788. \vfill
  789. %============================================================ OPERATORS #2
  790. \subsection*{Numbers}
  791. \setlength{\entlength}{4.2cm}
  792. Current release uses {\sc Ieee}~64-bit floating point and precise integer 
  793. computations in range $\approx\pm 10^{40000}$. Exact floating point,
  794. rational and complex numbers are currently not implemented.\\
  795. \ent{(number?\ \OBJ)}{}
  796. \ent{(complex?\ \OBJ)}{currently $\equiv$ {\tt number?}}
  797. \ent{(real?\ \OBJ)}{currently $\equiv$ {\tt number?}}
  798. \ent{(rational?\ \OBJ)}{currently $\equiv$ {\tt integer?}}
  799. \ent{(integer?\ \OBJ)}{}
  800. \note{whether \OBJ\ results from exact integer computations}
  801. \ent{(float?\ \OBJ)}{$\equiv$ \raisebox{-1.6ex}{{\tt 
  802. \begin{tabular}{@{}l@{\ }l}
  803. (and    & (number?\ \OBJ) \\
  804.     & (not (integer?\ \OBJ)))
  805. \end{tabular}}}}
  806. \res{(exact?\ \NUM)}{currently $\equiv$ {\tt integer?}}
  807. \res{(inexact?\ \NUM)}{currently $\equiv$ {\tt float?}}
  808. \ent{(negative?\ \NUM)}{}
  809. \ent{(zero?\ \NUM)}{}
  810. \ent{(positive?\ \NUM)}{}
  811. \ent{(number->string \NUM\ \opt{radix})}{\hspace{7mm}\argt{radix} is 2, 8, 10 or 16}
  812. \res{(float \NUM)}{{\sc Ieee}~64-bit representation}
  813. \res{(truncate \NUM)}{\NUM\ rounded to zero}
  814. \res{(round \NUM)}{nearest integer, tie breaks even}
  815. \res{(floor \NUM)}{integer $\in\, ]\mbox{\NUM}-1;\:\mbox{\NUM}]$}
  816. \res{(ceiling \NUM)}{integer $\in [\mbox{\NUM};\:\mbox{\NUM}+1[$}
  817. \ent{(1+ \NUM)}{$\equiv$ {\tt ADD1}}
  818. \ent{(-1+ \NUM)}{$\equiv$ {\tt SUB1}}
  819. \ent{([minus,-] \NUM)}{unary minus}
  820. \ent{(/ \NUM)}{inverse}
  821. \ent{(abs \NUM)}{}
  822. \ent{(+ \opt{\NUM} \ldots)}{{\tt (- \opt{\IND\NUM1 \IND\NUM2} \ldots)}}
  823. \ent{(* \opt{\NUM} \ldots)}{{\tt (/ \opt{\IND\NUM1 \IND\NUM2} \ldots)}}
  824. \ent{(< \opt{\NUM} \ldots)}{{\tt (>= \opt{\NUM} \ldots)}}
  825. \ent{(> \opt{\NUM} \ldots)}{{\tt (<= \opt{\NUM} \ldots)}}
  826. \ent{(= \opt{\NUM} \ldots)}{{\tt (<> \opt{\NUM} \ldots)}}
  827. \ent{(min \opt{\NUM} \ldots)}{{\tt (max \opt{\NUM} \ldots)}}
  828. \ent{(sqrt \NUM)}{}
  829. \ent{(exp \opt{base} \argt{exponent})}{$\equiv$ {\tt expt}}
  830. \ent{(log \NUM\ \opt{base})}{}
  831. \ent{(sin \NUM)}{{\tt (asin \NUM)}}
  832. \ent{(cos \NUM)}{{\tt (acos \NUM)}}
  833. \ent{(tan \NUM)}{{\tt (atan \NUM\ \opt{divisor})}}
  834. \vspace{2mm}
  835. \ent{(even?\ \INT)}{}
  836. \ent{(odd?\ \INT)}{}
  837. \ent{(integer->string \INT\ \argt{radix})}{\hspace{7mm}\argt{radix} is any arbitrary integer}
  838. \res{(integer->char \INT)}{\nth\ character from {\sc Ascii} code}
  839. \res{(ascii->symbol \INT)}{a one-char symbol}
  840. \begin{acculade}{}
  841. \tt (quotient \argt{dividend} \argt{divisor})    & rounds to zero \\
  842. \tt (remainder \argt{dividend} \argt{divisor})    & same sign as \argt{dividend}
  843. \end{acculade}
  844. \begin{acculade}{}
  845. \tt (divide \argt{dividend} \argt{divisor})    & rounds to $-\infty$ \\
  846. \tt (modulo \argt{dividend} \argt{divisor})    & same sign as \argt{divisor}
  847. \end{acculade}
  848. \ent{(gcd \INT\ \ldots)}{greatest common divisor}
  849. \ent{(lcm \INT\ \ldots)}{least common multiple}
  850. \ent{(bitwise-and \INT\ \ldots)}{}
  851. \ent{(bitwise-or \INT\ \ldots)}{}
  852. \ent{(bitwise-xor \INT\ \ldots)}{}
  853. \res{(random \argt{range})}{a non-negative integer ${} < \mbox{\argt{range}}$}
  854. \ent{(randomize \opt{\INT})}{random seed; defaults to time-of-day}
  855. \vfill
  856. %============================================================ OPERATORS #3
  857. \subsection*{Characters}
  858. \setlength{\entlength}{5.4cm}
  859. \begin{tabbing}
  860. \tt\hspace{2cm}\=\hspace{2cm}\=\hspace{2cm}\=\hspace{2cm}\=\hspace{2cm}\=\kill
  861. \verb+#\BACKSPACE+    \> \verb+#\ESCAPE+    \> \verb+#\NEWLINE+ \> \verb+#\PAGE+ \\
  862. \verb+#\RETURN+    \> \verb+#\RUBOUT+    \> \verb+#\SPACE+    \> \verb+#\TAB+
  863. \end{tabbing}
  864. \vspace{-2mm}
  865. \ent{(char?\ \OBJ)}{}
  866. \ent{(char->integer \CHAR)}{using {\sc Ascii} character set}
  867. \res{(string \CHAR\ \ldots)}{a string built of \CHAR s}
  868. \ent{(char-downcase \CHAR)}{}
  869. \ent{(char-upcase \CHAR)}{}
  870. \ent{(char-ci[<,<=,=,>,>=]?\ \IND\CHAR1 \IND\CHAR2)}{case-insensitive}
  871. \ent{(char[<,<=,=,>,>=]?\ \IND\CHAR1 \IND\CHAR2)}{}
  872. \subsection*{Strings}
  873. \renewcommand{\entfont}{\tt}
  874. Strings are enclosed in {\tt "\ldots"}; All indexes start at 0\\[1mm]
  875. \ent{(string?\ \STR)}{}
  876. \ent{(string-null?\ \STR)}{}
  877. \res{(string->list \STR)}{a list of chars}
  878. \ent{(string->number \STR\ \opt{radix})}{\argt{radix} is 2, 8, 10 or 16}
  879. \ent{(string->symbol \STR)}{}
  880. \res{(string->uninterned-symbol \STR)}{a unique symbol}
  881. \ent{(make-string \argt{length} \opt{init-char})}{}
  882. \ent{(string-append \opt{\STR} \ldots)}{returns {\tt ""} when no arguments}
  883. \ent{(string-copy \STR)}{}
  884. \ent{(string-fill!\ \STR\ \argt{fill-char})}{}
  885. \res{(string-length \STR)}{an integer}
  886. \res{(string-ref \STR\ \argt{index})}{\nth\ char of \STR}
  887. \ent{(string-set!\ \STR\ \argt{index} \CHAR)}{}
  888. \ent{(string-ci[<,=] \IND\STR1 \IND\STR2)}{case-insensitive}
  889. \ent{(string[<,<=,=,>=,>] \IND\STR1 \IND\STR2)}{}
  890. \vspace{2mm}
  891. \res{(substring \STR\ \argt{start} \argt{end})}{\STR\/[\argt{start}\ldots\argt{end}-1]}
  892. \ent{(substring-fill!\ \STR\ \argt{start} \argt{end} \argt{fill-char})}{}
  893. \ent{(substring-find-next-char-in-set \STR\ \argt{start} \argt{end} \argt{char-set})}{}
  894. \ent{(substring-find-previous-char-in-set \STR\ \argt{start} \argt{end} \argt{char-set})}{}
  895.     \note{$\Longrightarrow$\hspace{2mm}index or {\tt \#F}.
  896.         \argt{char-set} is a character or a string}
  897. \ent{(substring-find-next-string[-ci] \STR\ \argt{start} \argt{end} \argt{match})}{}
  898. \ent{(substring-find-previous-string[-ci] \STR\ \argt{start} \argt{end} \argt{match})}{}
  899. \ent{(substring-move-[left,right]!\ \IND\STR1\,\IND{\argt{start}}1\,\IND{\argt{end}}1\,\IND\STR2\,\IND{\argt{start}}2\,)}{}
  900.     \note{The direction is important only if the substrings overlap}
  901. \ent{(substring-ci[<,=] \IND\STR1 \IND{\argt{start}}1 \IND{\argt{end}}1
  902.     \IND\STR2 \IND{\argt{start}}2 \IND{\argt{end}}2)}{}
  903. \ent{(substring[<,<=,=,>=,>] \IND\STR1 \IND{\argt{start}}1 \IND{\argt{end}}1
  904.     \IND\STR2 \IND{\argt{start}}2 \IND{\argt{end}}2)}{}
  905. \res{(sprintf \argt{template} \opt{\OBJ} \ldots)}{a string}
  906. \res{(sscanf \argt{input-string} \argt{template})}{\List{\opt{\OBJ} \ldots}}
  907. \subsection*{Symbols}
  908. \setlength{\entlength}{4.4cm}
  909. \renewcommand{\entfont}{\tt}
  910. Symbols can be enclosed in {\tt |\ldots|}\\[1mm]
  911. \ent{(symbol?\ \OBJ)}{}
  912. \ent{(symbol->string \SYM)}{}
  913. \res{(symbol->ascii \SYM)}{{\sc Ascii} code of $1^{\mbox{\tiny st}}$ char
  914. of \SYM}
  915. \res{(explode \SYM)}{a list of one-char symbols}
  916. \res{(gensym \opt{string, number})}{a new uninterned symbol}
  917.     \note{optionally sets the string prefix or initialize the counter suffix}
  918. {\setlength{\entlength}{6.7cm}
  919. \res{(property \SYM\ \opt{property-name \opt{new-value}})}{old value(s)}
  920.     \note{if \argt{new-value} is {\tt\it\#!UNDEFINED}, the property is removed}
  921. \vfill\newpage
  922. %============================================================ OPERATORS #4
  923. \subsection*{\markup Ports \& Windows}
  924. \setlength{\entlength}{4.7cm}
  925. \ent{\symb{CONSOLE}}{a port: the display and keyboard}
  926. \ent{MAX-CONSOLE}{\List{lines .\ cols}, the display's size}
  927. \ent{PCS-STATUS-WINDOW}{the bottom line's window}
  928. \ent{STANDARD-[INPUT,OUTPUT]}{the standard I/O ports}
  929. \ent{[INPUT,OUTPUT]-PORT}{fluidly bound to current ports}
  930. \ent{(port?\ \OBJ)}{}
  931. \ent{(window?\ \OBJ}{}
  932. \ent{(input-string?\ \OBJ)}{}
  933. \ent{(input-port?\ \PORT)}{}
  934. \ent{(output-port?\ \PORT)}{}
  935. \ent{(char-ready?\ \PORT)}{}
  936. \ent{(eof-object?\ \OBJ)}{}
  937. {\setlength{\entlength}{6cm}
  938. \begin{acculade}{$\Longrightarrow$\hspace{2mm}a port}
  939. \tt (open[-binary]-[input,output]-file \argt{filename})\\
  940. \tt (open-extend-file \argt{filename})\\
  941. \tt (open-input-string \STR)
  942. \end{acculade}
  943. \ent{(close-[input,output]-port \PORT)}{}
  944. \res{(current-[input,output]-port)}{a port}
  945. \ent{(line-length \OP)}{}
  946. \ent{(current-column \OP)}{}
  947. \ent{(flush-input \OP)}{}
  948. \ent{(read \OP)}{read a full Scheme expression}
  949. \ent{(read-atom \OP)}{}
  950. \ent{(read-char \OP)}{}
  951. \ent{(read-line \OP)}{}
  952. \ent{(display \OBJ\ \OP)}{human-readable style; $\equiv$ {\tt princ}}
  953. \ent{(write \OBJ\ \OP)}{machine style; $\equiv$ {\tt prin1}, {\tt print}}
  954. \ent{(write-char \CHAR\ \OP)}{}
  955. \ent{(writeln \IND\OBJ1 \ldots)}{}
  956. \ent{(pp \OBJ\ \opt{port \opt{width}})}{pretty prints Scheme objects}
  957. \ent{(newline \OP)}{}
  958. \ent{(fresh-line \OP)}{}
  959. \res{(print-length \OBJ)}{an integer}
  960. \ent{(set-line-length!\ \argt{length} \OP)}{}
  961. \res{(get-file-position \PORT)}{an integer}
  962. \ent{(set-file-position!\ \PORT\ \argt{num-bytes} \argt{whence})}{}
  963.     \note{\argt{whence} is \symb{SET} (0), \symb{CUR} (1) or \symb{END} (2)}
  964. \ent{(call-with-[input,output]-file \argt{filename} \Proc{port})}{}
  965. \vspace{2mm}
  966. \ent{(make-window \opt{label\/ \opt{border?}})}{}
  967. \ent{(window-clear \WIN)}{}
  968. \ent{(window-scroll-[up,down] \WIN\ \opt{start-line \opt{end-line}})}{}
  969. \ent{(window-delete \WIN)}{}
  970. \ent{(window-popup[-delete] \WIN)}{}
  971. \ent{(window-get-attribute \WIN\ \argt{name})}{}
  972.     \note{\argt{name} is \symb{[BORDER,TEXT]-ATTRIBUTES}
  973.         or \symb{WINDOW-FLAGS}}
  974. \ent{(window-set-attribute!\ \WIN\ \argt{name} \argt{value})}{}
  975. \ent{(window-reverse-text!\ \WIN)}{}
  976. \res{(window-get-cursor \WIN)}{a pair: {\tt (\argt{line} .\ \argt{column})}}
  977. \ent{(window-set-cursor!\ \WIN\ \argt{cursor-line} \argt{cursor-column})}{}
  978. \res{(window-get-position \WIN)}{a pair. The top is at {\tt (0 .\ 0)}}
  979. \ent{(window-set-position!\ \WIN\ \argt{ul-line} \argt{ul-column})}{}
  980. \res{(window-get-size \WIN)}{a pair}
  981. \ent{(window-set-size!\ \WIN\ \argt{\#lines} \argt{\#columns})}{}
  982. \res{(window-save-contents \WIN)}{contents: binary string}
  983. \ent{(window-restore-contents \WIN\ \argt{contents})}{}
  984. \vfill
  985. %============================================================ OPERATORS #5
  986. \subsection*{Vectors}
  987. \setlength{\entlength}{4.1cm}
  988. Vectors are enclosed in {\tt \#(\ldots)}\\[1mm]
  989. \ent{(vector?\ \VECT)}{}
  990. \ent{(vector->list \VECT)}{}
  991. \ent{(make-vector \argt{length} \opt{init-value})}{}
  992. \res{(vector \OBJ\ \ldots)}{a new vector}
  993. \ent{(vector-fill!\ \VECT\ \OBJ)}{}
  994. \res{(vector-length \VECT)}{an integer}
  995. \ent{(vector-ref \VECT\ \argt{index})}{\argt{index} starts at 0}
  996. \ent{(vector-set!\ \VECT\ \argt{index} \OBJ)}{}
  997. \subsection*{Environments}
  998. \setlength{\entlength}{4.5cm}
  999. \ent{USER-GLOBAL-ENVIRONMENT}{parent of {\tt USER-INITIAL-ENVIRONMENT}}
  1000. \ent{USER-INITIAL-ENVIRONMENT}{top-level environment}
  1001. \ent{(environment?\ \OBJ)}{}
  1002. \ent{(unbound?\ \IND\SYM1 \ldots\ \ENV)}{}
  1003. \ent{(access \IND\SYM1 \ldots\ \ENV)}{looks up \IND\SYM1 in (\ldots\ in \ENV)}
  1004. \ent{(define \argt{ident} \opt{exp})}{\argt{ident} is a name or a formals-list}
  1005. {\setlength{\entlength}{7cm}
  1006. \res{(make-environment \argt{scheme\_definition\_or\_exp} \ldots)}{an env}
  1007. \res{(the-environment)}{the current lexical environment}
  1008. {\setlength{\entlength}{5.2cm}
  1009. \res{(procedure-environment \argt{procedure})}{\argt{procedure}'s environment}
  1010. \ent{(environment-parent \ENV)}{}
  1011. \res{(environment-son \ENV)}{an (empty) child}
  1012. {\setlength{\entlength}{4.3cm}
  1013. \res{(environment-bindings \ENV)}{a list of name-value pairs}
  1014. \ent{(set!\ \argt{ident} \argt{exp})}{}
  1015.     \note{\argt{ident} is \argt{name}, {\tt (fluid \argt{name})} or {\tt (access \IND{\argt{name}}1 \ldots\ \ENV)}}
  1016. \ent{(unbind \SYM\ \ENV)}{}
  1017. \ent{(eval \argt{exp} \opt{env})}{}
  1018. \subsection*{Procedures, Continuations \& Engines}
  1019. \setlength{\entlength}{4.5cm}
  1020. \ent{(procedure?\ \OBJ)}{{\tt \#T} for procedures and continuations}
  1021. \ent{(continuation?\ \OBJ)}{}
  1022. \ent{(call/cc \Proc{continue})}{$\equiv$ {\tt call-with-current-continuation}}
  1023. \ent{(make-engine \argt{thunk})}{\argt{thunk} is \Proc{ticks success failure}}
  1024. \ent{(engine-return \argt{value})}{returns \argt{value} to the engine's caller}
  1025. \subsection*{Operating System}
  1026. \setlength{\entlength}{4.3cm}
  1027. \ent{(dos-call \argt{progname} \argt{parameters} \opt{memory-to-free \opt{restore-screen?}})}{}
  1028. \res{(dos-chdir \argt{directory-string})}{previous directory}
  1029. \ent{(dos-change-drive \argt{drive-string})}{}
  1030. \ent{(dos-delete \argt{filename})}{$\equiv$ {\tt delete-file}}
  1031. \res{(dos-get-dir \opt{drive-string})}{a string: the current directory}
  1032. \res{(dos-dir \argt{mask-string})}{a list of filenames}
  1033. \ent{(dos-get-env \argt{env-variable-name})}{}
  1034. \ent{(dos-put-env \argt{string})}{doesn't change parent's environment}
  1035. \ent{(dos-search-file \argt{filespec})}{searches upon {\tt PATH}}
  1036. \ent{(dos-file-copy \argt{source-filename} \argt{dest-filename})}{}
  1037. {\setlength{\entlength}{6.2cm}
  1038. \ent{(dos-rename \argt{current-filename} \argt{new-filename})}{can move files}
  1039. \ent{(dos-file-size \argt{filename})}{}
  1040. \ent{(\%system-file-name \argt{filename})}{prepends PCS files' path}
  1041. \res{(filename-split \argt{filename})}{{\tt (\argt{drive} \argt{path} \argt{name} \argt{ext})}}
  1042. {\setlength{\entlength}{6cm}
  1043. \res{(filename-merge (\argt{drive} \argt{path} \argt{name} \argt{ext}))}{\argt{filename}}
  1044. \vfill
  1045. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1046. %============================================================ MISC #1
  1047. \section*{Command line}
  1048. \setlength{\entlength}{3.8cm}
  1049. \renewcommand{\entfont}{\tt}
  1050. \ent{SCHEME-TOP-LEVEL}{fluidly bound to the interpreter's loop}
  1051. \ent{(reset)}{resets the current interpreter loop}
  1052. \ent{(reset-scheme-top-level)}{binds the top-level to its default}
  1053. \ent{(scheme-reset)}{}
  1054. \res{(\%c $n$)}{query of \nth\ command-line entry}
  1055. \res{(\%d $n$)}{result of \nth\ command-line entry}
  1056. \vspace{2mm}
  1057. \res{(get-history)}{a list of strings: previous input lines}
  1058. \ent{(push-history \argt{string[--list]})}{}
  1059. \ent{(clear-history)}{}
  1060. \ent{(pcs-learn-symbols \argt{symbol-list})}{}
  1061. {\setlength{\entlength}{5.5cm}
  1062. \res{(pcs-recognize-symbol \argt{symbol} \opt{len})}{completion of \argt{symbol}}
  1063. \ent{(pcs-macro-keys \List{\List{key . replacement} \argt{\ldots}})}{}
  1064. \note{\argt{key} is an {\sc Ascii} code or a scan-code$\cdot${\tt\#x100}}
  1065. \note{\argt{replacement} is a [dotted-]list of strings}
  1066. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1067. \section*{Miscellaneous}
  1068. \setlength{\entlength}{3.8cm}
  1069. \renewcommand{\entfont}{\tt}
  1070. \ent{PCS-DEBUG-MODE}{whether debug information is generated}
  1071. \ent{PCS-INTEGRATE-PRIMITIVES}{}
  1072.     \note{whether primitives are inline-expanded}
  1073. \ent{PCS-INTEGRATE-INTEGRABLES}{}
  1074.     \note{whether {\tt define-integrable}'s are inline-expanded}
  1075. \ent{*THE-NON-PRINTING-OBJECT*}{}
  1076.     \note{never printed, even by {\tt write}}
  1077. \ent{PCS-GC-MESSAGE}{}
  1078.     \note{string displayed during garbage collecting}
  1079. \ent{PCS-GC-RESET}{}
  1080.     \note{string normally displayed in the status window. Contains
  1081.     up to 2 ``{\tt \%lu}'': free scheme memory and kernel memory (in bytes)}
  1082. \vspace{2mm}
  1083. \ent{CLOCK-TICK}{number of ticks per second}
  1084. \res{(clock)}{number of ticks since start of PCS}
  1085. \note{there are $2^{16}$ ticks per hour, i.e.\ $\approx 18.2$ per second}
  1086. \ent{(time \opt{\symb{UNIX} $\mid$\symb{GM} $\mid$\symb{LOCAL}}
  1087.     \opt{language} \opt{source-time})}{}
  1088. \res{}{\argt{converted-time}}
  1089. \note{\argt{language}s supported are \symb{ENGLISH} and \symb{FRENCH}}
  1090. \note{a \argt{time} is an integer ({\sc Unix\/}-time) or a prefix of the list:}
  1091. \note{\List{sec min hour month-day month year week-day year-day}}
  1092. \note{\argt{source-time}'s fields default to current time values}
  1093. \vspace{2mm}
  1094. \ent{(text-mode \argt{{\sc Bios}-mode})}{$-1$ for previous mode, {\tt \#x40} for $50$ lines}
  1095. \ent{(full-screen)}{makes the console port as big as possible}
  1096. \ent{(split-screen \argt{height})}{shrinks the console to the bottom lines}
  1097. \ent{(gc-screen)}{positions {\tt PCS-STATUS-WINDOW}}
  1098. \vspace{2mm}
  1099. \ent{(load \argt{filename})}{\argt{filename} can be scheme, web or FSL code}
  1100. \ent{(fast-load \argt{FSL-filename})}{}
  1101. \ent{(fast-save-file \argt{source-file[--list]} \opt{dest-file})}{}
  1102. \ent{(autoload-from-file \argt{filename} \argt{list-of-variables} \opt{environment})}{}
  1103. \ent{(transcript-on \argt{filename})}{}
  1104. \ent{(transcript-off)}{}
  1105. \ent{(edit \argt{pair})}{the yukky list editor}
  1106. \ent{(gc \opt{compact?})}{invokes the garbage collector}
  1107. \res{(freesp)}{amount of free Scheme memory}
  1108. \ent{(exit \opt{DOS-return-value})}{}
  1109. \vfill
  1110. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1111. %============================================================ PACK #1
  1112. \section*{SCOOPS: the Object Package}
  1113. \setlength{\entlength}{4.5cm}
  1114. \renewcommand{\entfont}{\tt}
  1115. \ent{(load-scoops)}{load Scoops package}
  1116. \begin{tabbing}
  1117. \tt (define-class \= \argt{name} \\
  1118.                   \> [(classvars \argt{item} \ldots)] \\
  1119.                   \> [(instvars [\argt{item},\argt{active-item}] \ldots)] \\
  1120.                   \> [(mixins \argt{item} \ldots)] \\
  1121.                   \> [(options \=[\argt{option}] \\
  1122.                   \>           \>[(\argt{option} \argt{variable} \ldots)]
  1123.     \ldots)])
  1124. \end{tabbing}
  1125. \vspace{-3mm}
  1126. \note{\argt{item} is {\tt (\argt{var} \argt{init-value})} or just
  1127. \argt{var} to leave it unbound}
  1128. \note{\argt{active-item} is {\tt (\argt{var} (active \argt{init-value} \argt{get-proc} \argt{set-proc}))}}
  1129. \note{\argt{option} is {\tt [gettable,settable,inittable]-variables}}
  1130. \note{\argt{option} applies on all variables when none is specified}
  1131. \ent{(define-method (\CLAS\ \argt{method}) (\opt{parameter} \ldots)
  1132. \argt{exp} \ldots)}{}
  1133. \ent{(delete-method (\CLAS\ \argt{method}))}{}
  1134. \ent{(make-instance \CLAS\ \argt{var} \argt{init-val} \ldots)}{}
  1135. \res{(class-of-object \argt{object})}{\argt{name}}
  1136. \ent{(send[-if-handles] \argt{object} \argt{msg} \opt{arg} \ldots)}{}
  1137. \note{{\tt send-if-handles} returns {\tt \#F} when \argt{object} cannot
  1138. handle \argt{msg}}
  1139. \vspace{2mm}
  1140. \ent{(class-compiled?\ \CLAS)}{}
  1141. \ent{(compile-class \CLAS)}{}
  1142. \res{(name->class \argt{name})}{\CLAS}
  1143. \ent{(rename-class (\CLAS\ \argt{name}))}{}
  1144. \ent{(describe [\CLAS,\argt{object}])}{displays a full description}
  1145. \res{(classvars \CLAS)}{a list of class variable names}
  1146. \ent{(all-classvars \CLAS)}{includes inherited class variables}
  1147. \ent{(instvars \CLAS)}{}
  1148. \ent{(all-instvars \CLAS)}{}
  1149. \ent{(methods \CLAS)}{}
  1150. \ent{(all-methods \CLAS)}{}
  1151. \ent{(mixins \CLAS)}{}
  1152. \res{(getcv \CLAS\ \argt{var})}{value of \argt{var} in \CLAS}
  1153. \ent{(setcv \CLAS\ \argt{var} \argt{exp})}{}
  1154. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1155. \section*{Directory Structure}
  1156. \setlength{\entlength}{4.5cm}
  1157. \begin{tabbing}
  1158. sources\=/hershey\hspace{5mm}    \= \kill
  1159. \sf bin     \>    \> executables and run-time librairies\\
  1160. \sf brief    \>    \> interface to {\sc Borland}'s editor\\
  1161. \sf doc        \>    \> \LaTeX, {\sc PostScript} and {\sc Ascii} docs\\
  1162. \sf samples    \>    \> small Scheme-{\tt WEB} demos\\
  1163. \sf sources     \>\sf /asm    \> Kernel Turbo Assembler 3.1 source\\
  1164.         \>\sf /c    \> Kernel Borland C++ 3.1 source\\
  1165.         \>\sf /s    \> Kernel 4.02 Scheme source\\
  1166.         \>\sf /bgi    \> BGI tools, various sources\\
  1167.         \>\sf /hershey    \> Hershey fonts {\tt WEB} source\\
  1168.         \>\sf /lisp    \> Lisp compatibility Scheme source\\
  1169.         \>\sf /web    \> Scheme-{\tt WEB}, various sources
  1170. \end{tabbing}
  1171. \vfill
  1172. \newpage
  1173. \end{multicols}
  1174. \end{document}
  1175.