dict-environment.tex 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104
  1. % -*- Mode: TeX -*-
  2. % Environment
  3. % Time
  4. % Debugging/Tuning
  5. % Storage System
  6. % Browsing/Editing
  7. % Read-Eval-Print Loop
  8. % External Environment Queries
  9. %-------------------- Time --------------------
  10. %%% ========== DECODE-UNIVERSAL-TIME
  11. \begincom{decode-universal-time}\ftype{Function}
  12. \label Syntax::
  13. \DefunWithValuesNewline decode-universal-time
  14. {universal-time {\opt} time-zone}
  15. {second, minute, hour, date, month, year, day, daylight-p, zone}
  16. \label Arguments and Values::
  17. \param{universal-time}---a \term{universal time}.
  18. \issue{TIME-ZONE-NON-INTEGER:ALLOW}
  19. \param{time-zone}---a \term{time zone}.
  20. \endissue{TIME-ZONE-NON-INTEGER:ALLOW}
  21. \param{second}, \param{minute}, \param{hour}, \param{date}, \param{month},
  22. \param{year}, \param{day}, \param{daylight-p}, \param{zone}---a \term{decoded time}.
  23. \label Description::
  24. %% 25.4.1 18
  25. Returns the \term{decoded time} represented by the given \term{universal time}.
  26. If \param{time-zone} is not supplied,
  27. it defaults to the current time zone adjusted for daylight saving time.
  28. \issue{DECODE-UNIVERSAL-TIME-DAYLIGHT:LIKE-ENCODE}
  29. If \param{time-zone} is supplied, daylight saving time information is ignored.
  30. The daylight saving time flag is \nil\ if \param{time-zone} is supplied.
  31. \endissue{DECODE-UNIVERSAL-TIME-DAYLIGHT:LIKE-ENCODE}
  32. \label Examples::
  33. \issue{DECODE-UNIVERSAL-TIME-DAYLIGHT:LIKE-ENCODE}
  34. \code
  35. (decode-universal-time 0 0) \EV 0, 0, 0, 1, 1, 1900, 0, \term{false}, 0
  36. ;; The next two examples assume Eastern Daylight Time.
  37. (decode-universal-time 2414296800 5) \EV 0, 0, 1, 4, 7, 1976, 6, \term{false}, 5
  38. (decode-universal-time 2414293200) \EV 0, 0, 1, 4, 7, 1976, 6, \term{true}, 5
  39. ;; This example assumes that the time zone is Eastern Daylight Time
  40. ;; (and that the time zone is constant throughout the example).
  41. (let* ((here (nth 8 (multiple-value-list (get-decoded-time)))) ;Time zone
  42. (recently (get-universal-time))
  43. (a (nthcdr 7 (multiple-value-list (decode-universal-time recently))))
  44. (b (nthcdr 7 (multiple-value-list (decode-universal-time recently here)))))
  45. (list a b (equal a b))) \EV ((T 5) (NIL 5) NIL)
  46. \endcode
  47. \endissue{DECODE-UNIVERSAL-TIME-DAYLIGHT:LIKE-ENCODE}
  48. \label Affected By::
  49. \term{Implementation-dependent} mechanisms for calculating when or if daylight
  50. savings time is in effect for any given session.
  51. \label Exceptional Situations:\None.
  52. \label See Also::
  53. \funref{encode-universal-time}, \funref{get-universal-time},
  54. %5.3
  55. {\secref\Time}
  56. \label Notes:\None.
  57. \endcom
  58. %%% ========== ENCODE-UNIVERSAL-TIME
  59. \begincom{encode-universal-time}\ftype{function}
  60. \label Syntax::
  61. \DefunWithValuesNewline encode-universal-time
  62. {\vtop{\hbox{second minute hour date month year}
  63. \hbox{{\opt} time-zone}}}
  64. {universal-time}
  65. \label Arguments and Values::
  66. \param{second}, \param{minute}, \param{hour},
  67. \param{date}, \param{month}, \param{year},
  68. \param{time-zone}---the corresponding parts of a \term{decoded time}.
  69. (Note that some of the nine values in a full \term{decoded time} are redundant,
  70. and so are not used as inputs to this function.)
  71. \param{universal-time}---a \term{universal time}.
  72. \label Description::
  73. %% 25.4.1 20
  74. %!!! Actually, the args are only part of a decoded time
  75. \funref{encode-universal-time} converts a time from Decoded Time format
  76. to a \term{universal time}.
  77. If \param{time-zone} is supplied, no adjustment for daylight savings time is performed.
  78. \label Examples::
  79. \code
  80. (encode-universal-time 0 0 0 1 1 1900 0) \EV 0
  81. (encode-universal-time 0 0 1 4 7 1976 5) \EV 2414296800
  82. ;; The next example assumes Eastern Daylight Time.
  83. (encode-universal-time 0 0 1 4 7 1976) \EV 2414293200
  84. \endcode
  85. \label Affected By:\None.
  86. \label Exceptional Situations:\None.
  87. \label See Also::
  88. \funref{decode-universal-time}, \funref{get-decoded-time}
  89. \label Notes:\None.
  90. \endcom
  91. %%% ========== GET-DECODED-TIME
  92. %%% ========== GET-UNIVERSAL-TIME
  93. \begincom{get-universal-time, get-decoded-time}\ftype{Function}
  94. \label Syntax::
  95. \DefunWithValues get-universal-time {\noargs} {universal-time}
  96. \DefunWithValuesNewline get-decoded-time {\noargs}
  97. {second, minute, hour, date, month, year, day, daylight-p, zone}
  98. \label Arguments and Values::
  99. \param{universal-time}---a \term{universal time}.
  100. \param{second}, \param{minute}, \param{hour},
  101. \param{date}, \param{month}, \param{year},
  102. \param{day}, \param{daylight-p}, \param{zone}---a \term{decoded time}.
  103. \label Description::
  104. %% 25.4.1 17
  105. \funref{get-universal-time} returns the current time, represented as a \term{universal time}.
  106. %% 25.4.1 15
  107. \funref{get-decoded-time} returns the current time, represented as a \term{decoded time}.
  108. \label Examples::
  109. \code
  110. ;; At noon on July 4, 1976 in Eastern Daylight Time.
  111. (get-decoded-time) \EV 0, 0, 12, 4, 7, 1976, 6, \term{true}, 5
  112. ;; At exactly the same instant.
  113. (get-universal-time) \EV 2414332800
  114. ;; Exactly five minutes later.
  115. (get-universal-time) \EV 2414333100
  116. ;; The difference is 300 seconds (five minutes)
  117. (- * **) \EV 300
  118. \endcode
  119. \label Side Effects:\None.
  120. \label Affected By::
  121. The time of day (\ie the passage of time),
  122. the system clock's ability to keep accurate time,
  123. and the accuracy of the system clock's initial setting.
  124. \label Exceptional Situations::
  125. An error \oftype{error} might be signaled if the current time cannot be determined.
  126. \label See Also::
  127. \funref{decode-universal-time},
  128. \funref{encode-universal-time},
  129. {\secref\Time}
  130. \label Notes::
  131. \code
  132. (get-decoded-time) \EQ (decode-universal-time (get-universal-time))
  133. \endcode
  134. No \term{implementation} is required to have a way to verify that the
  135. time returned is correct. However, if an \term{implementation} provides
  136. a validity check (\eg the failure to have properly initialized the system
  137. clock can be reliably detected) and that validity check fails,
  138. the \term{implementation} is strongly encouraged (but not required)
  139. to signal an error \oftype{error} (rather than, for example, returning a
  140. known-to-be-wrong value) that is \term{correctable} by allowing the user
  141. to interactively set the correct time.
  142. \endcom
  143. %%% ========== SLEEP
  144. \begincom{sleep}\ftype{Function}
  145. \label Syntax::
  146. \DefunWithValues sleep {seconds} {\nil}
  147. \label Arguments and Values::
  148. \param{seconds}---a non-negative \term{real}.
  149. \label Description::
  150. %% 25.4.1 24
  151. Causes execution to cease and become dormant for approximately the
  152. seconds of real time indicated by \param{seconds},
  153. whereupon execution is resumed.
  154. \label Examples::
  155. \code
  156. (sleep 1) \EV NIL
  157. ;; Actually, since SLEEP is permitted to use approximate timing,
  158. ;; this might not always yield true, but it will often enough that
  159. ;; we felt it to be a productive example of the intent.
  160. (let ((then (get-universal-time))
  161. (now (progn (sleep 10) (get-universal-time))))
  162. (>= (- now then) 10))
  163. \EV \term{true}
  164. \endcode
  165. \label Side Effects::
  166. Causes processing to pause.
  167. \label Affected By::
  168. The granularity of the scheduler.
  169. \label Exceptional Situations::
  170. \Shouldchecktype{seconds}{a non-negative \term{real}}
  171. \label See Also:\None.
  172. \label Notes:\None.
  173. \endcom
  174. %-------------------- Debugging Tuning --------------------
  175. %%% ========== APROPOS
  176. %%% ========== APROPOS-LIST
  177. \begincom{apropos, apropos-list}\ftype{Function}
  178. \label Syntax::
  179. \DefunWithValues apropos {string {\opt} package} {\novalues}
  180. \DefunWithValues apropos-list {string {\opt} package} {symbols}
  181. \label Arguments and Values::
  182. \param{string}---a \term{\symbolnamedesignator}.
  183. \param{package}---a \term{package designator} or \nil.
  184. \Default{\nil}
  185. \param{symbols}---a \term{list} of \term{symbols}.
  186. \label Description::
  187. %% 25.3.0 23
  188. These functions search for \term{interned} \term{symbols}
  189. whose \term{names} contain the substring \param{string}.
  190. For \funref{apropos}, as each such \term{symbol} is found,
  191. its name is printed on \term{standard output}.
  192. In addition,
  193. if such a \term{symbol} is defined as a \term{function} or \term{dynamic variable},
  194. information about those definitions might also be printed.
  195. %% 25.3.0 23
  196. For \funref{apropos-list},
  197. no output occurs as the search proceeds;
  198. instead a list of the matching \term{symbols} is returned when the search is complete.
  199. If \param{package} is \term{non-nil},
  200. only the \term{symbols} \term{accessible} in that \param{package} are searched;
  201. otherwise all \term{symbols} \term{accessible} in any \term{package} are searched.
  202. Because a \term{symbol} might be available
  203. by way of more than one inheritance path,
  204. \funref{apropos} might print information about the \term{same} \term{symbol} more than once,
  205. %What about APROPOS-LIST? Can its result contain duplicates? -kmp 24-Apr-91
  206. %I added this next since it was implicitly vague; makes it explicitly vague. -kmp 1-Feb-92
  207. or \funref{apropos-list} might return a \term{list} containing duplicate \term{symbols}.
  208. %!!! This really wants a technical issue in order to resolve it.
  209. Whether or not the search is case-sensitive is \term{implementation-defined}.
  210. \label Examples:\None.
  211. \label Affected By::
  212. The set of \term{symbols} which are currently \term{interned}
  213. in any \term{packages} being searched.
  214. \funref{apropos} is also affected by \varref{*standard-output*}.
  215. \label Exceptional Situations:\None.
  216. \label See Also:\None.
  217. \label Notes:\None.
  218. \endcom
  219. %%% ========== DESCRIBE
  220. \begincom{describe}\ftype{Function}
  221. %% 25.3.0 12
  222. \label Syntax::
  223. \DefunWithValues describe {object {\opt} stream} {\novalues}
  224. \label Arguments and Values::
  225. \param{object}---an \term{object}.
  226. \issue{DESCRIBE-UNDERSPECIFIED:DESCRIBE-OBJECT}
  227. \param{stream}---an \term{output} \term{stream designator}.
  228. \Default{\term{standard output}}
  229. \endissue{DESCRIBE-UNDERSPECIFIED:DESCRIBE-OBJECT}
  230. \label Description::
  231. \funref{describe} displays information about \param{object}
  232. \issue{DESCRIBE-UNDERSPECIFIED:DESCRIBE-OBJECT}
  233. to \param{stream}.
  234. \endissue{DESCRIBE-UNDERSPECIFIED:DESCRIBE-OBJECT}
  235. %This used to be worded in a way which required these two behaviors in seeming
  236. %contradiction to the remark about output being implementation-dependent.
  237. %Barmar flagged this and I fixed it in a way that is hopefully non-controversial.
  238. % -kmp 29-Dec-90
  239. For example, \funref{describe} of a \term{symbol} might show the
  240. \term{symbol}'s value, its definition, and each of its properties.
  241. \funref{describe} of a \term{float} might show the number's
  242. internal representation in a way that is useful for tracking
  243. down round-off errors. In all cases, however, the nature and format of the
  244. output of \funref{describe} is \term{implementation-dependent}.
  245. %% 25.3.0 13
  246. \funref{describe} can describe something that it finds inside the \param{object};
  247. in such cases, a notational device such as increased indentation or positioning in a
  248. table is typically used in order to visually distinguish such recursive descriptions
  249. from descriptions of the argument \param{object}.
  250. \issue{DESCRIBE-UNDERSPECIFIED:DESCRIBE-OBJECT}
  251. The actual act of describing the object is implemented by \funref{describe-object}.
  252. \funref{describe} exists as an interface primarily to manage argument defaulting (including
  253. conversion of arguments \t\ and \nil\ into \term{stream} \term{objects}) and to inhibit
  254. any return values from \funref{describe-object}.
  255. \endissue{DESCRIBE-UNDERSPECIFIED:DESCRIBE-OBJECT}
  256. \issue{DESCRIBE-INTERACTIVE:NO}
  257. \funref{describe} is not intended to be an interactive function. In a
  258. \term{conforming implementation}, \funref{describe} must not, by default,
  259. prompt for user input. User-defined methods for \funref{describe-object}
  260. are likewise restricted.
  261. \endissue{DESCRIBE-INTERACTIVE:NO}
  262. \label Examples:\None.
  263. \label Side Effects::
  264. Output to \term{standard output} or \term{terminal I/O}.
  265. \label Affected By::
  266. \varref{*standard-output*} and \varref{*terminal-io*},
  267. methods on \funref{describe-object} and \funref{print-object}
  268. for \term{objects} having user-defined \term{classes}.
  269. \label Exceptional Situations:\None.
  270. \label See Also::
  271. \funref{inspect}, \funref{describe-object}
  272. \label Notes:\None.
  273. %% There are argument congruence problems with this stuff, so it's just not worth
  274. %% keeping. A discussion among Quinquevirate left us with no good way out. -kmp 30-Jan-92
  275. %\issue{DESCRIBE-INTERACTIVE:NO}
  276. % An \term{implementation} may be extended to permit additional, non-portable keyword arguments to \funref{describe}
  277. % which, if used, might cause \funref{describe} to behave in an interactive way.
  278. %
  279. % An implementations may be extended to permit additional, non-portable keyword
  280. % arguments would prompt for or require
  281. % user input as long as the default action if no keyword arguments are supplied does not
  282. % prompt for or
  283. % require user input.
  284. % For example, the following kind of interaction would be permissible in
  285. % implementations which chose to do it:
  286. %
  287. % \code
  288. % (defvar *my-table* (make-hash-table))
  289. % (setf (gethash 'foo *my-table*) 1)
  290. % (setf (gethash 'bar *my-table*) 2)
  291. % (setf (gethash 'foobar *my-table*) 3)
  292. % (describe *my-table* :interactive t)
  293. % #<EQ-HASH-TABLE 259> has 3 entries.
  294. % Do you want to see its contents? (Yes or No) Yes
  295. % \endcode
  296. %\endissue{DESCRIBE-INTERACTIVE:NO}
  297. \endcom
  298. %%% ========== DESCRIBE-OBJECT
  299. \begincom{describe-object}\ftype{Standard Generic Function}
  300. \issue{DESCRIBE-UNDERSPECIFIED:DESCRIBE-OBJECT}
  301. \label Syntax::
  302. \DefgenWithValues {describe-object} {object stream} {\term{implementation-dependent}}
  303. \label Method Signatures::
  304. \Defmeth {describe-object} {(\param{object} standard-object) \param{stream}}
  305. \label Arguments and Values::
  306. \param{object}---an \term{object}.
  307. \param{stream}---a \term{stream}.
  308. \label Description::
  309. The generic function \funref{describe-object} prints a description of
  310. \param{object} to a \param{stream}. \funref{describe-object} is called
  311. by \funref{describe}; it must not be called by the user.
  312. %I changed should -> must in the above. An implementation can always defined
  313. %the consequences in order to lift this restriction.
  314. Each implementation is required to provide a \term{method} on
  315. \theclass{standard-object} and \term{methods} on enough other
  316. \term{classes} so as to ensure that there is always an applicable \term{method}.
  317. Implementations are free to add \term{methods} for other \term{classes}.
  318. Users can write \term{methods} for \funref{describe-object} for their
  319. own \term{classes} if they do not wish to inherit an implementation-supplied
  320. \term{method}.
  321. \term{Methods} on \funref{describe-object} can recursively call
  322. \funref{describe}. Indentation, depth limits, and circularity detection
  323. are all taken care of automatically, provided that each \term{method}
  324. handles exactly one level of structure and calls \funref{describe}
  325. recursively if there are more structural levels. The consequences are
  326. undefined if this rule is not obeyed.
  327. In some implementations the \param{stream} argument passed to a
  328. \funref{describe-object} method is not the original \param{stream}, but is
  329. an intermediate \term{stream} that implements parts of \funref{describe}.
  330. \term{Methods} should therefore not depend on the identity of this
  331. \term{stream}.
  332. %Output is sent to \param{stream}.
  333. \label Examples::
  334. \code
  335. (defclass spaceship ()
  336. ((captain :initarg :captain :accessor spaceship-captain)
  337. (serial# :initarg :serial-number :accessor spaceship-serial-number)))
  338. (defclass federation-starship (spaceship) ())
  339. (defmethod describe-object ((s spaceship) stream)
  340. (with-slots (captain serial#) s
  341. (format stream "~&~S is a spaceship of type ~S,~
  342. ~%with ~A at the helm ~
  343. and with serial number ~D.~%"
  344. s (type-of s) captain serial#)))
  345. (make-instance 'federation-starship
  346. :captain "Rachel Garrett"
  347. :serial-number "NCC-1701-C")
  348. \EV #<FEDERATION-STARSHIP 26312465>
  349. (describe *)
  350. \OUT #<FEDERATION-STARSHIP 26312465> is a spaceship of type FEDERATION-STARSHIP,
  351. \OUT with Rachel Garrett at the helm and with serial number NCC-1701-C.
  352. \EV \novalues
  353. \endcode
  354. \label Affected By:\None.
  355. \label Exceptional Situations:\None.
  356. \label See Also::
  357. \funref{describe}
  358. \label Notes::
  359. The same implementation techniques that are applicable to \funref{print-object} are
  360. applicable to \funref{describe-object}.
  361. The reason for making the return values for \funref{describe-object}
  362. unspecified is to avoid forcing users to include explicit \f{(values)}
  363. in all of their \term{methods}. \funref{describe} takes care of that.
  364. \endissue{DESCRIBE-UNDERSPECIFIED:DESCRIBE-OBJECT}
  365. \endcom
  366. %%% ========== TRACE
  367. %%% ========== UNTRACE
  368. \begincom{trace, untrace}\ftype{Macro}
  369. \label Syntax::
  370. \DefmacWithValues trace {\starparam{function-name}} {trace-result}
  371. \DefmacWithValues untrace {\starparam{function-name}} {untrace-result}
  372. \label Arguments and Values::
  373. \issue{FUNCTION-NAME:LARGE}
  374. \param{function-name}---a \term{function name}.
  375. \endissue{FUNCTION-NAME:LARGE}
  376. \param{trace-result}---\term{implementation-dependent},
  377. unless no \term{function-names} are supplied,
  378. %% 25.3.0 6
  379. in which case \param{trace-result} is a \term{list} of \term{function names}.
  380. \param{untrace-result}---\term{implementation-dependent}.
  381. \label Description::
  382. \macref{trace} and \macref{untrace} control the invocation of the trace facility.
  383. Invoking \macref{trace} with one or more \param{function-names} causes
  384. the denoted \term{functions} to be ``traced.''
  385. Whenever a traced \term{function} is invoked, information
  386. about the call,
  387. about the arguments passed,
  388. and about any eventually returned values
  389. is printed to \term{trace output}.
  390. If \macref{trace} is used with no \param{function-names},
  391. no tracing action is performed;
  392. instead, a list of the \term{functions} currently being traced is returned.
  393. %% 25.3.0 4
  394. Invoking \macref{untrace} with one or more function names causes those
  395. functions to be ``untraced'' (\ie no longer traced).
  396. %% 25.3.0 7
  397. If \macref{untrace} is used with no \param{function-names},
  398. all \term{functions} currently being traced are untraced.
  399. If a \term{function} to be traced has been open-coded
  400. (\eg because it was declared \declref{inline}),
  401. a call to that \term{function} might not produce trace output.
  402. \label Examples::
  403. \code
  404. (defun fact (n) (if (zerop n) 1 (* n (fact (- n 1)))))
  405. \EV FACT
  406. (trace fact)
  407. \EV (FACT)
  408. ;; Of course, the format of traced output is implementation-dependent.
  409. (fact 3)
  410. \OUT 1 Enter FACT 3
  411. \OUT | 2 Enter FACT 2
  412. \OUT | 3 Enter FACT 1
  413. \OUT | | 4 Enter FACT 0
  414. \OUT | | 4 Exit FACT 1
  415. \OUT | 3 Exit FACT 1
  416. \OUT | 2 Exit FACT 2
  417. \OUT 1 Exit FACT 6
  418. \EV 6
  419. \endcode
  420. \label Side Effects::
  421. Might change the definitions of the \term{functions} named by \param{function-names}.
  422. \label Affected By::
  423. Whether the functions named are defined or already being traced.
  424. \label Exceptional Situations::
  425. % addressed in the packages chapter. --sjl 5 Mar 92
  426. %\issue{LISP-SYMBOL-REDEFINITION:MAR89-X3J13}
  427. % The consequences are undefined if an \term{external symbol} of
  428. % \thepackage{common-lisp} is
  429. % used as a \param{function-name} argument.
  430. %\endissue{LISP-SYMBOL-REDEFINITION:MAR89-X3J13}
  431. %% 25.3.0 5
  432. Tracing an already traced function,
  433. or untracing a function not currently being traced,
  434. should produce no harmful effects, but might signal a warning.
  435. \label See Also::
  436. \varref{*trace-output*},
  437. \macref{step}
  438. \label Notes::
  439. %% 25.3.0 8
  440. \macref{trace} and \macref{untrace} may also accept additional
  441. \term{implementation-dependent} argument formats. The format of the trace
  442. output is \term{implementation-dependent}.
  443. Although \macref{trace} can be extended to permit non-standard options,
  444. \term{implementations} are nevertheless encouraged (but not required)
  445. to warn about the use of syntax or options
  446. that are neither specified by this standard
  447. nor added as an extension by the \term{implementation},
  448. since they could be symptomatic of typographical errors
  449. or of reliance on features supported in \term{implementations}
  450. other than the current \term{implementation}.
  451. \endcom
  452. %%% ========== STEP
  453. \begincom{step}\ftype{Macro}
  454. \label Syntax::
  455. \DefmacWithValues step {form} {\starparam{result}}
  456. \label Arguments and Values::
  457. \param{form}---a \term{form}; \evalspecial.
  458. \param{results}---the \term{values} returned by the \param{form}.
  459. \label Description::
  460. \macref{step} implements a debugging paradigm wherein the programmer
  461. is allowed to \term{step} through the \term{evaluation} of a \term{form}.
  462. The specific nature of the interaction,
  463. \issue{EVALHOOK-STEP-CONFUSION:X3J13-NOV-89}
  464. including which I/O streams are used and
  465. whether the stepping has lexical or dynamic scope,
  466. \endissue{EVALHOOK-STEP-CONFUSION:X3J13-NOV-89}
  467. is \term{implementation-defined}.
  468. %% 25.3.0 9
  469. \issue{STEP-ENVIRONMENT:CURRENT}
  470. \macref{step} evaluates \param{form} in the current \term{environment}.
  471. A call to \macref{step} can be compiled, but it is acceptable for an
  472. implementation to interactively step through only those parts of the computation
  473. that are interpreted.
  474. \endissue{STEP-ENVIRONMENT:CURRENT}
  475. \issue{STEP-MINIMAL:PERMIT-PROGN}
  476. It is technically permissible for a \term{conforming implementation}
  477. to take no action at all other than normal \term{execution} of the \param{form}.
  478. In such a situation,
  479. \f{(step \i{form})}
  480. is equivalent to, for example,
  481. \f{(let () \i{form})}.
  482. In implementations where this is the case, the associated documentation
  483. should mention that fact.
  484. \endissue{STEP-MINIMAL:PERMIT-PROGN}
  485. \label Examples:\None.
  486. \label Affected By:\None?
  487. %% clean-up item in progress here.
  488. %% Could be bindings of streams to which i/o occurs, current
  489. %% dynamic environment, lexical too?
  490. \label Exceptional Situations:\None.
  491. \label See Also::
  492. \macref{trace}
  493. \issue{EVALHOOK-STEP-CONFUSION:X3J13-NOV-89}
  494. %\varref{*evalhook*}, \varref{*applyhook*}.
  495. \endissue{EVALHOOK-STEP-CONFUSION:X3J13-NOV-89}
  496. \label Notes::
  497. \term{Implementations} are encouraged to respond to the typing of \f{?}
  498. or the pressing of a ``help key'' by providing help including a list of
  499. commands.
  500. \issue{EVALHOOK-STEP-CONFUSION:X3J13-NOV-89}
  501. % %% 20.1.0 9
  502. % The \macref{step} facility can be implemented using the \varref{*evalhook*}
  503. % and \varref{*applyhook*} features.
  504. \endissue{EVALHOOK-STEP-CONFUSION:X3J13-NOV-89}
  505. \endcom
  506. %%% ========== TIME
  507. \begincom{time}\ftype{Macro}
  508. \label Syntax::
  509. \DefmacWithValues time {form} {\starparam{result}}
  510. \label Arguments and Values::
  511. \param{form}---a \term{form}; \evalspecial.
  512. \param{results}---the \term{values} returned by the \param{form}.
  513. \label Description::
  514. \issue{STEP-ENVIRONMENT:CURRENT}
  515. \funref{time} evaluates \param{form} in the current \term{environment} (lexical and dynamic).
  516. A call to \funref{time} can be compiled.
  517. \endissue{STEP-ENVIRONMENT:CURRENT}
  518. \funref{time} prints various timing data and other information to \term{trace output}.
  519. The nature and format of the printed information is \term{implementation-defined}.
  520. Implementations are encouraged to provide such information as
  521. elapsed real time,
  522. machine run time,
  523. and storage management statistics.
  524. %%% 25.3.0 10
  525. %\funref{time} evaluates \param{form}.
  526. \label Examples:\None.
  527. \label Affected By::
  528. The accuracy of the results depends, among other things, on the accuracy
  529. of the corresponding functions provided by the underlying operating system.
  530. The magnitude of the results may depend on
  531. the hardware,
  532. the operating system,
  533. the lisp implementation,
  534. and the state of the global environment.
  535. Some specific issues which frequently affect the outcome are
  536. hardware speed,
  537. nature of the scheduler (if any),
  538. number of competing processes (if any),
  539. system paging,
  540. whether the call is interpreted or compiled,
  541. whether functions called are compiled,
  542. the kind of garbage collector involved and whether it runs,
  543. whether internal data structures (e.g., hash tables) are implicitly reorganized,
  544. \etc.
  545. \label Exceptional Situations:\None.
  546. \label See Also::
  547. \funref{get-internal-real-time},
  548. \funref{get-internal-run-time}
  549. \label Notes::
  550. In general, these timings are not guaranteed to be reliable enough for
  551. marketing comparisons. Their value is primarily heuristic, for tuning
  552. purposes.
  553. For useful background information on the complicated issues involved in
  554. interpreting timing results, see {\GabrielBenchmarks}.
  555. \endcom
  556. %%% ========== INTERNAL-TIME-UNITS-PER-SECOND
  557. \begincom{internal-time-units-per-second}\ftype{Constant Variable}
  558. \label Constant Value::
  559. A positive \term{integer}, the magnitude of which is \term{implementation-dependent}.
  560. \label Description::
  561. The number of \term{internal time units} in one second.
  562. \label Examples:\None.
  563. \label See Also::
  564. \funref{get-internal-run-time}, \funref{get-internal-real-time}
  565. \label Notes::
  566. %Shouldn't this be in the glossary with the definition of internal time unit? -kmp
  567. These units form the basis of the Internal Time format representation.
  568. \endcom
  569. %%% ========== GET-INTERNAL-REAL-TIME
  570. \begincom{get-internal-real-time}\ftype{Function}
  571. \label Syntax::
  572. \DefunWithValues get-internal-real-time {\noargs} {internal-time}
  573. \label Arguments and Values::
  574. \param{internal-time}---a non-negative \term{integer}.
  575. \label Description::
  576. %% 25.4.1 23
  577. \funref{get-internal-real-time} returns as an \term{integer} the
  578. current time in \term{internal time units}, relative to an arbitrary
  579. time base. The difference between the values of two calls to this
  580. function is the amount of elapsed real time (\ie clock time) between the two calls.
  581. \label Examples:\None.
  582. \label Side Effects:\None.
  583. \label Affected By::
  584. Time of day (\ie the passage of time).
  585. The time base affects the result magnitude.
  586. \label Exceptional Situations:\None!
  587. \label See Also::
  588. \conref{internal-time-units-per-second}
  589. \label Notes:\None.
  590. \endcom
  591. %%% ========== GET-INTERNAL-RUN-TIME
  592. \begincom{get-internal-run-time}\ftype{Function}
  593. \label Syntax::
  594. \DefunWithValues get-internal-run-time {\noargs} {internal-time}
  595. \label Arguments and Values::
  596. \param{internal-time}---a non-negative \term{integer}.
  597. \label Description::
  598. %% 25.4.1 22
  599. Returns as an \term{integer} the current
  600. run time in \term{internal time units}. The precise meaning of this quantity is
  601. \term{implementation-defined}; it may measure real time, run time, CPU cycles, or some
  602. other quantity. The intent is that the difference between the values of two calls
  603. to this function be the amount of time between the two calls during which
  604. computational effort was expended on behalf of the executing program.
  605. \label Examples:\None.
  606. \label Side Effects:\None.
  607. \label Affected By::
  608. The \term{implementation},
  609. the time of day (\ie the passage of time).
  610. \label Exceptional Situations:\None!
  611. \label See Also::
  612. \conref{internal-time-units-per-second}
  613. \label Notes::
  614. Depending on the \term{implementation}, paging time and garbage
  615. collection time might be included in this measurement. Also, in a
  616. multitasking environment, it might not be possible to show the time for
  617. just the running process, so in some \term{implementations}, time taken
  618. by other processes during the same time interval might be included in
  619. this measurement as well.
  620. \endcom
  621. %%% ========== DISASSEMBLE
  622. \begincom{disassemble}\ftype{Function}
  623. %% 25.1.0 9
  624. \label Syntax::
  625. \DefunWithValues disassemble {fn} {\nil}
  626. \label Arguments and Values::
  627. \issue{FUNCTION-NAME:LARGE}
  628. \param{fn}---an \term{extended function designator}
  629. or a \term{lambda expression}.
  630. \endissue{FUNCTION-NAME:LARGE}
  631. \label Description::
  632. \Thefunction{disassemble} is a debugging aid that composes symbolic
  633. instructions or expressions in some \term{implementation-dependent}
  634. language which represent the code used to produce the \term{function}
  635. which is or is named by the argument \param{fn}. The result is displayed
  636. to \term{standard output} in an \term{implementation-dependent} format.
  637. If \param{fn} is a \term{lambda expression} or \term{interpreted function},
  638. it is compiled first and the result is disassembled.
  639. If the \param{fn} \term{designator} is a \term{function name},
  640. the \term{function} that it \term{names} is disassembled.
  641. \issue{DISASSEMBLE-SIDE-EFFECT:DO-NOT-INSTALL}
  642. (If that \term{function} is an \term{interpreted function},
  643. it is first compiled but the result of this implicit compilation is not installed.)
  644. \endissue{DISASSEMBLE-SIDE-EFFECT:DO-NOT-INSTALL}
  645. \label Examples::
  646. \issue{DISASSEMBLE-SIDE-EFFECT:DO-NOT-INSTALL}
  647. \code
  648. (defun f (a) (1+ a)) \EV F
  649. (eq (symbol-function 'f)
  650. (progn (disassemble 'f)
  651. (symbol-function 'f))) \EV \term{true}
  652. \endcode
  653. \endissue{DISASSEMBLE-SIDE-EFFECT:DO-NOT-INSTALL}
  654. \label Side Effects:\None.
  655. \label Affected By::
  656. \varref{*standard-output*}.
  657. \label Exceptional Situations::
  658. \Shouldchecktype{fn}{an \term{extended function designator}
  659. or a \term{lambda expression}}
  660. \label See Also:\None.
  661. \label Notes:\None.
  662. \endcom
  663. \issue{DOCUMENTATION-FUNCTION-TANGLED:REQUIRE-ARGUMENT}
  664. %%% ========== COMPILER-MACRO
  665. %%% ========== FUNCTION
  666. %%% ========== METHOD-COMBINATION
  667. %%% ========== SETF
  668. %%% ========== STRUCTURE
  669. %%% ========== TYPE
  670. %%% ========== VARIABLE
  671. %%% ========== DOCUMENTATION
  672. %%% ========== (SETF DOCUMENTATION)
  673. \begincom{documentation, (setf documentation)}\ftype{Standard Generic Function}
  674. %Note that the CLtL function \funref{documentation} is replaced by a generic function.
  675. \label Syntax::
  676. \DefgenWithValues documentation {x doc-type} {documentation}
  677. \DefgenWithValues {(setf documentation)} {new-value x doc-type} {new-value}
  678. \label Argument Precedence Order::
  679. \param{doc-type}, \param{object}
  680. \label Method Signatures::
  681. \def\DocMethods#1#2{{%
  682. {\bf #1:}\par
  683. \def\Meth##1##2{\Defmeth{documentation} {\specparam{x}{##1} \specparam{doc-type}{\f{(eql '##2)}}}\idxref{##2}\par}%
  684. #2\par%
  685. \def\Meth##1##2{\Defmeth{(setf documentation)} {\param{new-value} \specparam{x}{##1} \specparam{doc-type}{\f{(eql '##2)}}}\idxref{##2}\par}%
  686. #2\par}}
  687. % I fixed a bunch of font-o's and formatting inconsistencies, and reordered
  688. % all the methods into something a little less confusing. --sjl 7 Mar 92
  689. \issue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  690. %Signature for STANDARD-SLOT-DESCRIPTION removed.
  691. \DocMethods{Functions, Macros, and Special Forms}{%
  692. \Meth{function}{t}%
  693. \Meth{function}{function}%
  694. \Meth{list}{function}%
  695. \Meth{list}{compiler-macro}%
  696. \Meth{symbol}{function}%
  697. \Meth{symbol}{compiler-macro}%
  698. \Meth{symbol}{setf}}
  699. \DocMethods{Method Combinations}{%
  700. \Meth{method-combination}{t}%
  701. \Meth{method-combination}{method-combination}%
  702. \Meth{symbol}{method-combination}}
  703. \DocMethods{Methods}{%
  704. \Meth{standard-method}{t}}
  705. \DocMethods{Packages}{%
  706. \Meth{package}{t}}
  707. \DocMethods{Types, Classes, and Structure Names}{%
  708. \Meth{standard-class}{t}%
  709. \Meth{standard-class}{type}%
  710. \Meth{structure-class}{t}%
  711. \Meth{structure-class}{type}%
  712. \Meth{symbol}{type}%
  713. \Meth{symbol}{structure}}
  714. \DocMethods{Variables}{%
  715. \Meth{symbol}{variable}}
  716. \endissue{DOCUMENTATION-FUNCTION-BUGS:FIX}%
  717. \label Arguments and Values::
  718. \issue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  719. \param{x}---an \term{object}.
  720. %% Removed the detail here because it is implied by the signatures above.
  721. % This leaves room more naturally for implementation-defined extension. -kmp 2-Sep-91
  722. % a \term{symbol},
  723. % a \term{list},
  724. % a \term{method},
  725. % a \term{class},
  726. % a \term{package},
  727. % a \term{function},
  728. % or a \term{method combination} \term{object}.
  729. % % or a slot-description \term{object}.
  730. \endissue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  731. \param{doc-type}---a \term{symbol}.
  732. %% Per issue DOCUMENTATION-FUNCTION-TANGLED, this has been simplified.
  733. % If \param{x} is a \term{symbol} or a \term{list},
  734. % \param{doc-type} must be one of
  735. % \issue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  736. % \misc{compiler-macro},
  737. % \endissue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  738. % \misc{function},
  739. % \misc{method-combination},
  740. % \misc{setf},
  741. % \misc{structure},
  742. % \misc{type},
  743. % or \misc{variable};
  744. % otherwise, \param{doc-type} must not be supplied.
  745. \param{documentation}---a \term{string}, or \nil.
  746. \param{new-value}---a \term{string}.
  747. \label Description::
  748. \TheGF{documentation} returns the \term{documentation string}
  749. associated with the given \term{object} if it is available;
  750. otherwise it returns \nil.
  751. The \term{generic function} \f{(setf documentation)} updates the
  752. \term{documentation string} associated with \param{x} to \param{new-value}.
  753. If \param{x} is a \term{list},
  754. it must be of the form \f{(setf \param{symbol})}.
  755. \term{Documentation strings} are made available for debugging purposes.
  756. \term{Conforming programs} are permitted to use \term{documentation strings}
  757. when they are present, but should not depend for their correct behavior on
  758. the presence of those \term{documentation strings}.
  759. An \term{implementation} is permitted to discard \term{documentation strings}
  760. at any time for \term{implementation-defined} reasons.
  761. % For those situations where a \param{doc-type} argument is permitted,
  762. The nature of the \term{documentation string} returned depends on the
  763. \param{doc-type}, as follows:
  764. % I alphabetized this list. --sjl 7 Mar 92
  765. \beginlist
  766. \issue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  767. \itemitem{\misc{compiler-macro}}
  768. Returns the \term{documentation string} of the \term{compiler macro}
  769. whose \term{name} is the \term{function name} \param{x}.
  770. \endissue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  771. \itemitem{\misc{function}}
  772. If \param{x} is a \term{function name},
  773. returns the \term{documentation string} of
  774. the \term{function}, \term{macro}, or \term{special operator}
  775. whose \term{name} is \param{x}.
  776. If \param{x} is a \term{function},
  777. returns the \term{documentation string} associated with \param{x}.
  778. \itemitem{\misc{method-combination}}
  779. If \param{x} is a \term{symbol},
  780. returns the \term{documentation string} of
  781. the \term{method combination}
  782. whose \term{name} is \param{x}.
  783. If \param{x} is a \term{method combination},
  784. returns the \term{documentation string} associated with \param{x}.
  785. \itemitem{\misc{setf}}
  786. Returns the \term{documentation string} of
  787. \issue{SETF-METHOD-VS-SETF-METHOD:RENAME-OLD-TERMS}
  788. the \term{setf expander}
  789. \endissue{SETF-METHOD-VS-SETF-METHOD:RENAME-OLD-TERMS}
  790. whose \term{name} is the \term{symbol} \param{x}.
  791. \itemitem{\misc{structure}}
  792. %!!! wording??
  793. Returns the \term{documentation string}
  794. associated with the \term{structure name} \param{x}.
  795. \itemitem{\misc{t}}
  796. % added introductory text for this next list --sjl 7 Mar 92
  797. Returns a \term{documentation string} specialized on the \term{class} of
  798. the argument \param{x} itself.
  799. For example, if \param{x} is a \term{function},
  800. the \term{documentation string} associated with the \term{function} \param{x} is returned.
  801. % \beginlist
  802. %
  803. % \itemitem{\typeref{function}}
  804. %
  805. % Returns the \term{documentation string} associated with
  806. % the \term{function} \param{x}.
  807. %
  808. % \itemitem{\typeref{method-combination}}
  809. %
  810. % Returns the \term{documentation string} associated with
  811. % the \term{method combination} \param{x}.
  812. %
  813. % \itemitem{\typeref{package}}
  814. %
  815. % Returns the \term{documentation string} associated with
  816. % the \term{package} \param{x}.
  817. %
  818. % \itemitem{\typeref{standard-class} or \typeref{structure-class}}
  819. %
  820. % Returns the \term{documentation string} associated with
  821. % the \term{class} \param{x}.
  822. %
  823. % \itemitem{\typeref{standard-method}}
  824. %
  825. % Returns the \term{documentation string} associated with
  826. % the \term{method} \param{x}.
  827. %
  828. % \endlist
  829. \itemitem{\misc{type}}
  830. If \param{x} is a \term{symbol},
  831. returns the \term{documentation string} of the \term{class}
  832. whose \term{name} is the \term{symbol} \param{x},
  833. if there is such a \term{class}.
  834. Otherwise, it returns the \term{documentation string} of the \term{type}
  835. which is the \term{type specifier} \term{symbol} \param{x}.
  836. If \param{x} is a \term{structure class} or \term{standard class},
  837. returns the \term{documentation string} associated with
  838. the \term{class} \param{x}.
  839. \itemitem{\misc{variable}}
  840. Returns the \term{documentation string} of
  841. the \term{dynamic variable} or \term{constant variable}
  842. whose \term{name} is the \term{symbol} \param{x}.
  843. \endlist
  844. % An implementation may extend the set of \term{symbols}
  845. % that are acceptable as the \param{doc-type}.
  846. % If a \term{symbol} is not recognized as an acceptable \param{doc-type}
  847. % by the \term{implementation}, an error must be signaled.
  848. % \editornote{KMP: Can't the user extend this, too, via methods?}%!!!
  849. %% Rewrite per Moon's instructions:
  850. A \term{conforming implementation} or a \term{conforming program}
  851. may extend the set of \term{symbols} that are acceptable as the \param{doc-type}.
  852. %% This info should follow from the normal rules of method dispatching.
  853. %% No need to risk making it more complicated. -kmp 21-Aug-93
  854. %If \param{doc-type} is not recognized, an error is signaled.
  855. % %Moon: This is useless and should be removed.
  856. % %KMP: Done. 1-Feb-92
  857. % For those situations where a \param{doc-type} argument is not permitted,
  858. % the nature of the \term{documentation string} returned depends on the
  859. % \term{type} of the \term{object} \param{x}.
  860. \label Examples:\None.
  861. \label Affected By:\None.
  862. \label Exceptional Situations:\None.
  863. %% All of this should follow from normal method dispatch now. Let's not beat
  864. %% people over the head with a restatement of what should already be apparent,
  865. %% and also risk that we've said it in some way that's hard to implement. -kmp 21-Aug-93
  866. %
  867. % If \param{x} is
  868. % a \term{method} \term{object},
  869. % a \term{class} \term{object},
  870. % \issue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  871. % a \term{package} \term{object},
  872. % a \term{function} \term{object},
  873. % \endissue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  874. % or a \term{method combination} \term{object},
  875. % \issue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  876. % % or a slot description \term{object},
  877. % \endissue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  878. % the second argument must not be supplied,
  879. % or else an error \oftype{program-error} is signaled.
  880. %
  881. % If a \term{symbol} is not recognized as an acceptable \param{doc-type} argument by the
  882. % \term{implementation}, an error \oftype{error} is signaled.
  883. \label See Also:\None.
  884. \label Notes::
  885. \issue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  886. This standard prescribes no means to retrieve the \term{documentation strings}
  887. for individual slots specified in a \macref{defclass} form, but
  888. \term{implementations} might still provide debugging tools and/or
  889. programming language extensions which manipulate this information.
  890. Implementors wishing to provide such support are encouraged to consult the
  891. \term{Metaobject Protocol} for suggestions about how this might be done.
  892. \endissue{DOCUMENTATION-FUNCTION-BUGS:FIX}
  893. \endcom
  894. \endissue{DOCUMENTATION-FUNCTION-TANGLED:REQUIRE-ARGUMENT}
  895. %-------------------- Storage System --------------------
  896. %%% ========== ROOM
  897. \begincom{room}\ftype{Function}
  898. \label Syntax::
  899. \DefunWithValues room {{\opt} x} {\term{implementation-dependent}}
  900. \label Arguments and Values::
  901. \param{x}---one of \t, \nil, or \kwd{default}.
  902. \label Description::
  903. %% 25.3.0 15
  904. \funref{room} prints, to \term{standard output},
  905. information about the state of internal storage and its management.
  906. This might include descriptions of the amount of memory in use and
  907. the degree of memory compaction, possibly broken down by internal data type if that
  908. is appropriate. The nature and format of the printed information is
  909. \term{implementation-dependent}.
  910. The intent is to provide information that a \term{programmer}
  911. might use to tune a \term{program} for a particular \term{implementation}.
  912. %% 25.3.0 16
  913. \f{(room nil)} prints out a minimal amount of information.
  914. \f{(room t)} prints out a maximal amount of information.
  915. \issue{ROOM-DEFAULT-ARGUMENT:NEW-VALUE}
  916. \f{(room)} or \f{(room :default)} prints out an intermediate amount
  917. of information that is likely to be useful.
  918. \endissue{ROOM-DEFAULT-ARGUMENT:NEW-VALUE}
  919. \label Examples:\None.
  920. \label Side Effects::
  921. Output to \term{standard output}.
  922. \label Affected By::
  923. \varref{*standard-output*}.
  924. \label Exceptional Situations:\None.
  925. \label See Also:\None.
  926. \label Notes:\None.
  927. \endcom
  928. %-------------------- Browsing Editing --------------------
  929. %%% ========== ED
  930. \begincom{ed}\ftype{Function}
  931. \label Syntax::
  932. \DefunWithValues ed {{\opt} x} {\term{implementation-dependent}}
  933. \label Arguments and Values::
  934. \issue{FUNCTION-NAME:LARGE}
  935. \param{x}---\nil, a \term{pathname}, a \term{string}, or a \term{function name}.
  936. \endissue{FUNCTION-NAME:LARGE}
  937. \Default{\nil}
  938. \label Description::
  939. %% 25.3.0 17
  940. \funref{ed} invokes the editor if the \term{implementation} provides a resident editor.
  941. %% 25.3.0 18
  942. If \param{x} is \nil, the editor is entered.
  943. If the editor had been previously entered, its prior state is resumed, if possible.
  944. %% 25.3.0 19
  945. If \param{x} is a \term{pathname} or \term{string},
  946. it is taken as the \term{pathname designator} for a \term{file} to be edited.
  947. %% 25.3.0 20
  948. If \param{x} is a \term{function name}, the text of its definition is edited.
  949. The means by which the function text is obtained is \term{implementation-defined}.
  950. \label Examples:\None.
  951. \label Affected By:\None.
  952. \label Exceptional Situations::
  953. % I changed this from "implicitly vague" to "explicitly vauge" since CLtL doesn't
  954. % say and since Sandra felt this should be explicit. -kmp 9-Jan-92
  955. The consequences are undefined if the \term{implementation} does not provide a resident editor.
  956. Might signal \typeref{type-error} if its argument is supplied but is not
  957. a \term{symbol}, a \term{pathname}, or \nil.
  958. \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  959. If a failure occurs when performing some operation on the \term{file system}
  960. while attempting to edit a \term{file},
  961. an error \oftype{file-error} is signaled.
  962. \endissue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  963. \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  964. An error \oftype{file-error} might be signaled if \param{x}
  965. is a \term{designator} for a \term{wild} \term{pathname}.
  966. \endissue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  967. \term{Implementation-dependent} additional conditions might be signaled as well.
  968. \label See Also::
  969. \typeref{pathname},
  970. \issue{PATHNAME-LOGICAL:ADD}
  971. \typeref{logical-pathname},
  972. \endissue{PATHNAME-LOGICAL:ADD}
  973. \funref{compile-file},
  974. \funref{load},
  975. \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  976. {\secref\PathnamesAsFilenames}
  977. \endissue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  978. \label Notes:\None.
  979. \issue{PATHNAME-HOST-PARSING:RECOGNIZE-LOGICAL-HOST-NAMES}
  980. % \issue{PATHNAME-LOGICAL:ADD}
  981. % Whether \funref{ed} recognizes \term{logical pathname} \term{namestrings}
  982. % is \term{implementation-defined}.
  983. % \endissue{PATHNAME-LOGICAL:ADD}
  984. \endissue{PATHNAME-HOST-PARSING:RECOGNIZE-LOGICAL-HOST-NAMES}
  985. \endcom
  986. %%% ========== INSPECT
  987. \begincom{inspect}\ftype{Function}
  988. \label Syntax::
  989. \issue{RETURN-VALUES-UNSPECIFIED:SPECIFY}
  990. \DefunWithValues inspect {object} {\term{implementation-dependent}}
  991. \endissue{RETURN-VALUES-UNSPECIFIED:SPECIFY}
  992. \label Arguments and Values::
  993. \param{object}---an \term{object}.
  994. \label Description::
  995. %% 25.3.0 14
  996. \funref{inspect} is an interactive version of \funref{describe}.
  997. The nature of the interaction is \term{implementation-dependent},
  998. but the purpose of \funref{inspect} is to make it easy to wander
  999. through a data structure, examining and modifying parts of it.
  1000. \label Examples:\None.
  1001. \label Side Effects::
  1002. \term{implementation-dependent}.
  1003. \label Affected By::
  1004. \term{implementation-dependent}.
  1005. \label Exceptional Situations::
  1006. \term{implementation-dependent}.
  1007. \label See Also::
  1008. \funref{describe}
  1009. \label Notes::
  1010. Implementations are encouraged to respond to the typing
  1011. of \f{?} or a ``help key'' by providing help, including a list
  1012. of commands.
  1013. \endcom
  1014. %-------------------- Read-Eval-Print Loop --------------------
  1015. %%% ========== DRIBBLE
  1016. \begincom{dribble}\ftype{Function}
  1017. \label Syntax::
  1018. \DefunWithValues dribble {{\opt} pathname} {\term{implementation-dependent}}
  1019. \label Arguments and Values::
  1020. \param{pathname}---a \term{pathname designator}.
  1021. \label Description::
  1022. %% 25.3.0 21
  1023. Either \term{binds} \varref{*standard-input*} and \varref{*standard-output*}
  1024. or takes other appropriate action,
  1025. so as to send a record of the input/output interaction to a file
  1026. named by \param{pathname}. \funref{dribble} is intended to create
  1027. a readable record of an interactive session.
  1028. \issue{PATHNAME-LOGICAL:ADD}
  1029. If \param{pathname} is a \term{logical pathname}, it is translated
  1030. into a physical pathname as if by calling \funref{translate-logical-pathname}.
  1031. \endissue{PATHNAME-LOGICAL:ADD}
  1032. %% 25.3.0 22
  1033. \f{(dribble)} terminates the recording of input and output
  1034. and closes the dribble file.
  1035. \issue{JUN90-TRIVIAL-ISSUES:25}
  1036. %Actually, the cleanup said "consequences are unspecified", but I wasn't happy with that,
  1037. %so I made the implementation have to tell you what would happen.
  1038. If \funref{dribble} is \term{called} while a \term{stream} to a ``dribble file''
  1039. is still open from a previous \term{call} to \funref{dribble},
  1040. the effect is \term{implementation-defined}. For example,
  1041. the already-\term{open} \term{stream} might be \term{closed},
  1042. or dribbling might occur both to the old \term{stream} and to a new one,
  1043. or the old \term{stream} might stay open but not receive any further output,
  1044. or the new request might be ignored,
  1045. or some other action might be taken.
  1046. \endissue{JUN90-TRIVIAL-ISSUES:25}
  1047. \label Examples:\None.
  1048. \label Affected By::
  1049. The \term{implementation}.
  1050. \label Exceptional Situations::
  1051. \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  1052. If a failure occurs when performing some operation on the \term{file system}
  1053. while creating the dribble file,
  1054. an error \oftype{file-error} is signaled.
  1055. \endissue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  1056. \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  1057. An error \oftype{file-error} might be signaled if \param{pathname}
  1058. is a \term{designator} for a \term{wild} \term{pathname}.
  1059. \endissue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  1060. \label See Also::
  1061. % This used to say the following, but Sandra thought it was bogus.
  1062. % I tend to agree. People can cross-reference through "pathname designator". -kmp 9-Jan-92
  1063. % \typeref{pathname},
  1064. % \issue{PATHNAME-LOGICAL:ADD}
  1065. % \typeref{logical-pathname}
  1066. % \endissue{PATHNAME-LOGICAL:ADD}
  1067. \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  1068. {\secref\PathnamesAsFilenames}
  1069. \endissue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}
  1070. \label Notes::
  1071. \issue{PATHNAME-HOST-PARSING:RECOGNIZE-LOGICAL-HOST-NAMES}
  1072. % \issue{PATHNAME-LOGICAL:ADD}
  1073. % Whether \funref{dribble} recognizes \term{logical pathname} \term{namestrings}
  1074. % is \term{implementation-defined}.
  1075. % \endissue{PATHNAME-LOGICAL:ADD}
  1076. \endissue{PATHNAME-HOST-PARSING:RECOGNIZE-LOGICAL-HOST-NAMES}
  1077. \funref{dribble} can return before subsequent
  1078. \term{forms} are executed. It also
  1079. can enter a recursive interaction loop,
  1080. returning only when \f{(dribble)} is done.
  1081. \issue{DRIBBLE-TECHNIQUE}
  1082. \funref{dribble} is intended primarily for interactive debugging;
  1083. its effect cannot be relied upon when used in a program.
  1084. \endissue{DRIBBLE-TECHNIQUE}
  1085. \endcom
  1086. %%% ========== - (Variable)
  1087. \begincom{$-$}\ftype{Variable}
  1088. \label Value Type::
  1089. a \term{form}.
  1090. \label Initial Value::
  1091. \term{implementation-dependent}.
  1092. \label Description::
  1093. %% 20.2.0 6
  1094. \Thevalueof{-} is the \term{form} that is currently being evaluated by
  1095. the \term{Lisp read-eval-print loop}.
  1096. \label Examples::
  1097. \code
  1098. (format t "~&Evaluating ~S~%" -)
  1099. \OUT Evaluating (FORMAT T "~&Evaluating ~S~%" -)
  1100. \EV NIL
  1101. \endcode
  1102. \label Affected By::
  1103. \term{Lisp read-eval-print loop}.
  1104. \label See Also::
  1105. \funref{+} (\term{variable}),
  1106. \funref{*} (\term{variable}),
  1107. \funref{/} (\term{variable}),
  1108. {\secref\TopLevelLoop}
  1109. \label Notes:\None.
  1110. \endcom
  1111. %%% ========== + (Variable)
  1112. %%% ========== ++ (Variable)
  1113. %%% ========== +++ (Variable)
  1114. \begincom{+, ++, +++}\ftype{Variable}
  1115. \label Value Type::
  1116. an \term{object}.
  1117. \label Initial Value::
  1118. \term{implementation-dependent}.
  1119. \label Description::
  1120. %% 20.2.0 5
  1121. \Thevariables{+}, \misc{++}, and \misc{+++} are maintained by the
  1122. \term{Lisp read-eval-print loop} to save \term{forms} that were
  1123. recently \term{evaluated}.
  1124. \Thevalueof{+} is the last \term{form} that was \term{evaluated},
  1125. \thevalueof{++} is the previous value of \misc{+}, and
  1126. \thevalueof{+++} is the previous value of \misc{++}.
  1127. %% 20.2.0 8
  1128. %If the evaluation of the variable \misc{+} is aborted for some reason,
  1129. %then the values associated with \misc{++},
  1130. %and \misc{+++} are updated ???
  1131. \label Examples::
  1132. \code
  1133. (+ 0 1) \EV 1
  1134. (- 4 2) \EV 2
  1135. (/ 9 3) \EV 3
  1136. (list + ++ +++) \EV ((/ 9 3) (- 4 2) (+ 0 1))
  1137. (setq a 1 b 2 c 3 d (list a b c)) \EV (1 2 3)
  1138. (setq a 4 b 5 c 6 d (list a b c)) \EV (4 5 6)
  1139. (list a b c) \EV (4 5 6)
  1140. (eval +++) \EV (1 2 3)
  1141. #.`(,@++ d) \EV (1 2 3 (1 2 3))
  1142. \endcode
  1143. \label Affected By::
  1144. \term{Lisp read-eval-print loop}.
  1145. \label See Also::
  1146. \funref{-} (\term{variable}),
  1147. \funref{*} (\term{variable}),
  1148. \funref{/} (\term{variable}),
  1149. {\secref\TopLevelLoop}
  1150. \label Notes:\None.
  1151. \endcom
  1152. %%% ========== * (Variable)
  1153. %%% ========== ** (Variable)
  1154. %%% ========== *** (Variable)
  1155. \begincom{*, **, ***}\ftype{Variable}
  1156. \label Value Type::
  1157. an \term{object}.
  1158. \label Initial Value::
  1159. \term{implementation-dependent}.
  1160. \label Description::
  1161. %% 20.2.0 7
  1162. \Thevariables{*}, \misc{**}, and \misc{***} are
  1163. maintained by the \term{Lisp read-eval-print loop} to save the
  1164. values of results that are printed each time through the loop.
  1165. \Thevalueof{*} is the most recent \term{primary value} that was printed,
  1166. \thevalueof{**} is the previous value of \misc{*}, and
  1167. \thevalueof{***} is the previous value of \misc{**}.
  1168. %The values of these variables are not updated when the evaluation of
  1169. %a form is aborted.
  1170. If several values are produced, \misc{*} contains the first value only;
  1171. \misc{*} contains \nil\ if zero values are produced.
  1172. %%This is very muddled. -kmp 17-Dec-90
  1173. % If the evaluation of the variable \misc{+} is aborted for some reason,
  1174. % then the values associated with \misc{*}, \misc{**}, and \misc{***} are not updated;
  1175. % they are updated only if the printing of values is at least begun (though not
  1176. % necessarily completed).
  1177. The \term{values} of \misc{*}, \misc{**}, and \misc{***} are updated immediately
  1178. prior to printing the \term{return value} of a top-level \term{form} by the
  1179. \term{Lisp read-eval-print loop}. If the \term{evaluation} of such a \term{form}
  1180. is aborted prior to its normal return, the values of \misc{*}, \misc{**}, and \misc{***}
  1181. are not updated.
  1182. \label Examples::
  1183. \code
  1184. (values 'a1 'a2) \EV A1, A2
  1185. 'b \EV B
  1186. (values 'c1 'c2 'c3) \EV C1, C2, C3
  1187. (list * ** ***) \EV (C1 B A1)
  1188. (defun cube-root (x) (expt x 1/3)) \EV CUBE-ROOT
  1189. (compile *) \EV CUBE-ROOT
  1190. (setq a (cube-root 27.0)) \EV 3.0
  1191. (* * 9.0) \EV 27.0
  1192. \endcode
  1193. \label Affected By::
  1194. \term{Lisp read-eval-print loop}.
  1195. \label See Also::
  1196. \funref{-} (\term{variable}),
  1197. \funref{+} (\term{variable}),
  1198. \funref{/} (\term{variable}),
  1199. {\secref\TopLevelLoop}
  1200. \label Notes::
  1201. \code
  1202. * \EQ (car /)
  1203. ** \EQ (car //)
  1204. *** \EQ (car ///)
  1205. \endcode
  1206. \endcom
  1207. %%% ========== / (Variable)
  1208. %%% ========== // (Variable)
  1209. %%% ========== /// (Variable)
  1210. \begincom{/, //, ///}\ftype{Variable}
  1211. \label Value Type::
  1212. a \term{proper list}.
  1213. \label Initial Value::
  1214. \term{implementation-dependent}.
  1215. \label Description::
  1216. %% 20.2.0 9
  1217. \Thevariables{/}, \misc{//}, and \misc{///} are maintained by
  1218. the \term{Lisp read-eval-print loop} to save the values of results that
  1219. were printed at the end of the loop.
  1220. \Thevalueof{/} is a \term{list} of the most recent \term{values} that were printed,
  1221. \thevalueof{//} is the previous value of \misc{/}, and
  1222. \thevalueof{///} is the previous value of \misc{//}.
  1223. %% 20.2.0 10
  1224. %% This is pretty muddled. -kmp 17-Dec-90
  1225. % If the evaluation of the \term{form} associated
  1226. % with the variable \misc{+} is aborted for some reason,
  1227. % then the values associated with
  1228. % \misc{/}, \misc{//}, and \misc{///} are not updated;
  1229. % they are updated only if the printing of values is at least begun (though not
  1230. % necessarily completed).
  1231. The \term{values} of \misc{/}, \misc{//}, and \misc{///} are updated immediately
  1232. prior to printing the \term{return value} of a top-level \term{form} by the
  1233. \term{Lisp read-eval-print loop}. If the \term{evaluation} of such a \term{form}
  1234. is aborted prior to its normal return, the values of \misc{/}, \misc{//}, and \misc{///}
  1235. are not updated.
  1236. \label Examples::
  1237. \code
  1238. (floor 22 7) \EV 3, 1
  1239. (+ (* (car /) 7) (cadr /)) \EV 22
  1240. \endcode
  1241. \label Affected By::
  1242. \term{Lisp read-eval-print loop}.
  1243. \label See Also::
  1244. \funref{-} (\term{variable}),
  1245. \funref{+} (\term{variable}),
  1246. \funref{*} (\term{variable}),
  1247. {\secref\TopLevelLoop}
  1248. \label Notes:\None.
  1249. \endcom
  1250. %-------------------- External Environment Queries --------------------
  1251. %%% ========== LISP-IMPLEMENTATION-TYPE
  1252. %%% ========== LISP-IMPLEMENTATION-VERSION
  1253. \begincom{lisp-implementation-type,
  1254. lisp-implementation-version}\ftype{Function}
  1255. \label Syntax::
  1256. \DefunWithValues lisp-implementation-type {\noargs} {description}
  1257. \DefunWithValues lisp-implementation-version {\noargs} {description}
  1258. \label Arguments and Values::
  1259. \param{description}---a \term{string} or \nil.
  1260. \label Description::
  1261. \funref{lisp-implementation-type} and \funref{lisp-implementation-version}
  1262. identify the current implementation of \clisp.
  1263. %% 25.4.2 2
  1264. \funref{lisp-implementation-type} returns a \term{string}
  1265. that identifies the generic name of
  1266. the particular \clisp\ implementation.
  1267. %% 25.4.2 3
  1268. \funref{lisp-implementation-version}
  1269. returns a \term{string} that identifies the version of
  1270. the particular \clisp\ implementation.
  1271. %% 25.4.2 1
  1272. If no appropriate
  1273. and relevant result can be produced, \nil\ is returned instead
  1274. of a \term{string}.
  1275. \label Examples::
  1276. \code
  1277. (lisp-implementation-type)
  1278. \EV "ACME Lisp"
  1279. \OV "Joe's Common Lisp"
  1280. (lisp-implementation-version)
  1281. \EV "1.3a"
  1282. \EV "V2"
  1283. \OV "Release 17.3, ECO #6"
  1284. \endcode
  1285. \label Side Effects:\None.
  1286. \label Affected By:\None.
  1287. \label Exceptional Situations:\None.
  1288. \label See Also:\None.
  1289. \label Notes:\None.
  1290. \endcom
  1291. %%% ========== SHORT-SITE-NAME
  1292. %%% ========== LONG-SITE-NAME
  1293. \begincom{short-site-name, long-site-name}\ftype{Function}
  1294. \label Syntax::
  1295. \DefunWithValues short-site-name {\noargs} {description}
  1296. \DefunWithValues long-site-name {\noargs} {description}
  1297. \label Arguments and Values::
  1298. \param{description}---a \term{string} or \nil.
  1299. \label Description::
  1300. %% 25.4.2 11
  1301. \funref{short-site-name} and \funref{long-site-name} return
  1302. a \term{string} that identifies the physical location
  1303. of the computer hardware,
  1304. or \nil\ if no appropriate \param{description} can be produced.
  1305. \label Examples::
  1306. \code
  1307. (short-site-name)
  1308. \EV "MIT AI Lab"
  1309. \OV "CMU-CSD"
  1310. (long-site-name)
  1311. \EV "MIT Artificial Intelligence Laboratory"
  1312. \OV "CMU Computer Science Department"
  1313. \endcode
  1314. \label Side Effects:\None.
  1315. \label Affected By::
  1316. The implementation,
  1317. the location of the computer hardware,
  1318. and the installation/configuration process.
  1319. \label Exceptional Situations:\None.
  1320. \label See Also:\None.
  1321. \label Notes:\None.
  1322. \endcom
  1323. %%% ========== MACHINE-INSTANCE
  1324. \begincom{machine-instance}\ftype{Function}
  1325. \label Syntax::
  1326. \DefunWithValues machine-instance {\noargs} {description}
  1327. \label Arguments and Values::
  1328. \param{description}---a \term{string} or \nil.
  1329. \label Description::
  1330. %% 25.4.2 6
  1331. Returns a \term{string} that identifies the particular instance of
  1332. the computer hardware on which \clisp\ is running,
  1333. or \nil\ if no such \term{string} can be computed.
  1334. \label Examples::
  1335. \code
  1336. (machine-instance)
  1337. \EV "ACME.COM"
  1338. \OV "S/N 123231"
  1339. \OV "18.26.0.179"
  1340. \OV "AA-00-04-00-A7-A4"
  1341. \endcode
  1342. \label Side Effects:\None.
  1343. \label Affected By::
  1344. The machine instance,
  1345. and the \term{implementation}.
  1346. \label Exceptional Situations:\None.
  1347. \label See Also::
  1348. \funref{machine-type}, \funref{machine-version}
  1349. \label Notes:\None.
  1350. \endcom
  1351. %%% ========== MACHINE-TYPE
  1352. \begincom{machine-type}\ftype{Function}
  1353. \label Syntax::
  1354. \DefunWithValues machine-type {\noargs} {description}
  1355. \label Arguments and Values::
  1356. \param{description}---a \term{string} or \nil.
  1357. \label Description::
  1358. %% 25.4.2 4
  1359. Returns a \term{string} that identifies the generic name of
  1360. the computer hardware on which \clisp\ is running.
  1361. \label Examples::
  1362. \code
  1363. (machine-type)
  1364. \EV "DEC PDP-10"
  1365. \OV "Symbolics LM-2"
  1366. \endcode
  1367. \label Side Effects:\None.
  1368. \label Affected By::
  1369. The machine type.
  1370. The implementation.
  1371. \label Exceptional Situations:\None.
  1372. \label See Also::
  1373. \funref{machine-version}
  1374. \label Notes:\None.
  1375. \endcom
  1376. %%% ========== MACHINE-VERSION
  1377. \begincom{machine-version}\ftype{Function}
  1378. \label Syntax::
  1379. \DefunWithValues machine-version {\noargs} {description}
  1380. \label Arguments and Values::
  1381. \param{description}---a \term{string} or \nil.
  1382. \label Description::
  1383. %% 25.4.2 5
  1384. Returns a \term{string} that identifies the version of the computer hardware
  1385. on which \clisp\ is running, or \nil\ if no such value can be computed.
  1386. \label Examples::
  1387. \code
  1388. (machine-version) \EV "KL-10, microcode 9"
  1389. \endcode
  1390. \label Side Effects:\None.
  1391. \label Affected By::
  1392. The machine version,
  1393. and the \term{implementation}.
  1394. \label Exceptional Situations:\None.
  1395. \label See Also::
  1396. \funref{machine-type}, \funref{machine-instance}
  1397. \label Notes:\None.
  1398. \endcom
  1399. %%% ========== SOFTWARE-TYPE
  1400. %%% ========== SOFTWARE-VERSION
  1401. \begincom{software-type, software-version}\ftype{Function}
  1402. \label Syntax::
  1403. \DefunWithValues software-type {\noargs} {description}
  1404. \DefunWithValues software-version {\noargs} {description}
  1405. \label Arguments and Values::
  1406. \param{description}---a \term{string} or \nil.
  1407. \label Description::
  1408. %% 25.4.2 7
  1409. \funref{software-type} returns a \term{string} that identifies the
  1410. generic name of any relevant supporting software, or \nil\ if no
  1411. appropriate or relevant result can be produced.
  1412. %% 25.4.2 8
  1413. \funref{software-version} returns a \term{string} that identifies
  1414. the version of any relevant supporting software, or \nil\ if no
  1415. appropriate or relevant result can be produced.
  1416. \label Examples::
  1417. \code
  1418. (software-type) \EV "Multics"
  1419. (software-version) \EV "1.3x"
  1420. \endcode
  1421. \label Side Effects:\None.
  1422. \label Affected By::
  1423. Operating system environment.
  1424. \label Exceptional Situations:\None.
  1425. \label See Also:\None.
  1426. \label Notes::
  1427. This information should be of use to maintainers of the \term{implementation}.
  1428. \endcom
  1429. %%% ========== USER-HOMEDIR-PATHNAME
  1430. \begincom{user-homedir-pathname}\ftype{Function}
  1431. \label Syntax::
  1432. \DefunWithValues user-homedir-pathname {{\opt} host} {pathname}
  1433. \label Arguments and Values::
  1434. \param{host}---a \term{string}, a \term{list} of \term{strings}, or \kwd{unspecific}.
  1435. %!!! Barmar: What does a list of strings denote??
  1436. \param{pathname}---a \term{pathname}, or \nil.
  1437. \label Description::
  1438. %% 23.1.2 36
  1439. \funref{user-homedir-pathname} determines the \term{pathname} that corresponds
  1440. to the user's home directory on \param{host}.
  1441. If \param{host} is not supplied, its value is \term{implementation-dependent}.
  1442. \issue{PATHNAME-UNSPECIFIC-COMPONENT:NEW-TOKEN}
  1443. For a description of \kwd{unspecific}, \seesection\PathnameComponents.
  1444. \endissue{PATHNAME-UNSPECIFIC-COMPONENT:NEW-TOKEN}
  1445. The definition of home directory is \term{implementation-dependent},
  1446. but defined in \clisp\ to mean the directory where the user
  1447. keeps personal files such as initialization files and mail.
  1448. \funref{user-homedir-pathname} returns a \term{pathname} without any name,
  1449. type, or version component (those components are all \nil)
  1450. for the user's home directory on \param{host}.
  1451. If it is impossible to determine the user's home directory on \param{host},
  1452. then \nil\ is returned.
  1453. \funref{user-homedir-pathname} never returns \nil\ if \param{host} is not supplied.
  1454. \label Examples::
  1455. \code
  1456. (pathnamep (user-homedir-pathname)) \EV \term{true}
  1457. \endcode
  1458. \label Side Effects:\None.
  1459. \label Affected By::
  1460. The host computer's file system,
  1461. and the \term{implementation}.
  1462. \label Exceptional Situations:\None.
  1463. \label See Also:\None.
  1464. \label Notes:\None.
  1465. \endcom