home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Doc / Extension / Extending.tex / node14_ct.html < prev    next >
LaTeX Document  |  1996-07-21  |  2.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: node14_ct.html

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file exported SGML document text default
97% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 43 61 | 6c 6c 69 6e 67 20 53 63 |ts of Ca|lling Sc|
|000000b0| 68 65 6d 65 20 66 72 6f | 6d 20 43 3c 2f 54 49 54 |heme fro|m C</TIT|
|000000c0| 4c 45 3e 0a 0a 3c 4d 45 | 54 41 20 48 54 54 50 2d |LE>..<ME|TA HTTP-|
|000000d0| 45 51 55 49 56 3d 22 43 | 6f 6e 74 65 6e 74 2d 54 |EQUIV="C|ontent-T|
|000000e0| 79 70 65 22 20 43 4f 4e | 54 45 4e 54 3d 22 74 65 |ype" CON|TENT="te|
|000000f0| 78 74 2f 68 74 6d 6c 3b | 20 63 68 61 72 73 65 74 |xt/html;| charset|
|00000100| 3d 75 74 66 2d 38 22 3e | 0a 3c 4d 45 54 41 20 4e |=utf-8">|.<META N|
|00000110| 41 4d 45 3d 22 76 69 65 | 77 70 6f 72 74 22 20 43 |AME="vie|wport" C|
|00000120| 4f 4e 54 45 4e 54 3d 22 | 77 69 64 74 68 3d 64 65 |ONTENT="|width=de|
|00000130| 76 69 63 65 2d 77 69 64 | 74 68 2c 20 69 6e 69 74 |vice-wid|th, init|
|00000140| 69 61 6c 2d 73 63 61 6c | 65 3d 31 2e 30 22 3e 0a |ial-scal|e=1.0">.|
|00000150| 3c 4d 45 54 41 20 4e 41 | 4d 45 3d 22 47 65 6e 65 |<META NA|ME="Gene|
|00000160| 72 61 74 6f 72 22 20 43 | 4f 4e 54 45 4e 54 3d 22 |rator" C|ONTENT="|
|00000170| 4c 61 54 65 58 32 48 54 | 4d 4c 20 76 32 30 32 32 |LaTeX2HT|ML v2022|
|00000180| 22 3e 0a 0a 3c 4c 49 4e | 4b 20 52 45 4c 3d 22 53 |">..<LIN|K REL="S|
|00000190| 54 59 4c 45 53 48 45 45 | 54 22 20 48 52 45 46 3d |TYLESHEE|T" HREF=|
|000001a0| 22 45 78 74 65 6e 64 69 | 6e 67 2e 63 73 73 22 3e |"Extendi|ng.css">|
|000001b0| 0a 0a 3c 4c 49 4e 4b 20 | 52 45 4c 3d 22 6e 65 78 |..<LINK |REL="nex|
|000001c0| 74 22 20 48 52 45 46 3d | 22 6e 6f 64 65 31 35 5f |t" HREF=|"node15_|
|000001d0| 6d 6e 2e 68 74 6d 6c 22 | 3e 0a 3c 4c 49 4e 4b 20 |mn.html"|>.<LINK |
|000001e0| 52 45 4c 3d 22 70 72 65 | 76 69 6f 75 73 22 20 48 |REL="pre|vious" H|
|000001f0| 52 45 46 3d 22 6e 6f 64 | 65 31 31 5f 6d 6e 2e 68 |REF="nod|e11_mn.h|
|00000200| 74 6d 6c 22 3e 0a 3c 4c | 49 4e 4b 20 52 45 4c 3d |tml">.<L|INK REL=|
|00000210| 22 75 70 22 20 48 52 45 | 46 3d 22 45 78 74 65 6e |"up" HRE|F="Exten|
|00000220| 64 69 6e 67 5f 6d 6e 2e | 68 74 6d 6c 22 3e 0a 3c |ding_mn.|html">.<|
|00000230| 4c 49 4e 4b 20 52 45 4c | 3d 22 6e 65 78 74 22 20 |LINK REL|="next" |
|00000240| 48 52 45 46 3d 22 6e 6f | 64 65 31 35 5f 6d 6e 2e |HREF="no|de15_mn.|
|00000250| 68 74 6d 6c 22 3e 0a 3c | 2f 48 45 41 44 3e 0a 20 |html">.<|/HEAD>. |
|00000260| 0a 3c 42 4f 44 59 20 62 | 67 63 6f 6c 6f 72 3d 22 |.<BODY b|gcolor="|
|00000270| 23 66 66 66 66 66 66 22 | 20 74 65 78 74 3d 22 23 |#ffffff"| text="#|
|00000280| 30 30 30 30 30 30 22 20 | 6c 69 6e 6b 3d 22 23 39 |000000" |link="#9|
|00000290| 39 34 34 45 45 22 20 76 | 6c 69 6e 6b 3d 22 23 30 |944EE" v|link="#0|
|000002a0| 30 30 30 66 66 22 20 61 | 6c 69 6e 6b 3d 22 23 30 |000ff" a|link="#0|
|000002b0| 30 66 66 30 30 22 3e 0a | 0a 3c 48 31 3e 3c 41 20 |0ff00">.|.<H1><A |
|000002c0| 49 44 3d 22 53 45 43 54 | 49 4f 4e 30 30 30 35 30 |ID="SECT|ION00050|
|000002d0| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 30 30 22 |00000000|0000000"|
|000002e0| 3e 0a 43 61 6c 6c 69 6e | 67 20 53 63 68 65 6d 65 |>.Callin|g Scheme|
|000002f0| 20 66 72 6f 6d 20 43 3c | 2f 41 3e 0a 3c 2f 48 31 | from C<|/A>.</H1|
|00000300| 3e 0a 0a 3c 50 3e 0a 53 | 6f 6d 65 74 69 6d 65 73 |>..<P>.S|ometimes|
|00000310| 2c 20 69 74 20 63 6f 75 | 6c 64 20 62 65 20 6e 65 |, it cou|ld be ne|
|00000320| 63 65 73 73 61 72 79 20 | 74 6f 20 65 78 65 63 75 |cessary |to execu|
|00000330| 74 65 20 73 6f 6d 65 20 | 53 63 68 65 6d 65 20 63 |te some |Scheme c|
|00000340| 6f 64 65 20 66 72 6f 6d | 20 61 20 43 20 66 75 6e |ode from| a C fun|
|00000350| 63 74 69 6f 6e 2e 0a 49 | 66 20 74 68 65 20 53 63 |ction..I|f the Sc|
|00000360| 68 65 6d 65 20 66 75 6e | 63 74 69 6f 6e 20 79 6f |heme fun|ction yo|
|00000370| 75 20 68 61 76 65 20 74 | 6f 20 63 61 6c 6c 20 69 |u have t|o call i|
|00000380| 73 20 61 20 70 72 69 6d | 69 74 69 76 65 2c 20 69 |s a prim|itive, i|
|00000390| 74 20 69 73 20 70 72 65 | 66 65 72 72 65 64 20 74 |t is pre|ferred t|
|000003a0| 6f 20 63 61 6c 6c 0a 64 | 69 72 65 63 74 6c 79 20 |o call.d|irectly |
|000003b0| 74 68 65 20 43 20 66 75 | 6e 63 74 69 6f 6e 20 77 |the C fu|nction w|
|000003c0| 68 69 63 68 20 69 6d 70 | 6c 65 6d 65 6e 74 20 69 |hich imp|lement i|
|000003d0| 74 2e 20 54 6f 20 6b 6e | 6f 77 20 74 68 65 20 6e |t. To kn|ow the n|
|000003e0| 61 6d 65 20 6f 66 20 74 | 68 65 20 43 20 66 75 6e |ame of t|he C fun|
|000003f0| 63 74 69 6f 6e 0a 77 68 | 69 63 68 20 69 6d 70 6c |ction.wh|ich impl|
|00000400| 65 6d 65 6e 74 20 61 20 | 53 63 68 65 6d 65 20 70 |ement a |Scheme p|
|00000410| 72 69 6d 69 74 69 76 65 | 2c 20 79 6f 75 27 6c 6c |rimitive|, you'll|
|00000420| 20 68 61 76 65 20 74 6f | 20 6c 6f 6f 6b 20 69 6e | have to| look in|
|00000430| 20 74 68 65 20 43 20 66 | 69 6c 65 20 3c 54 54 3e | the C f|ile <TT>|
|00000440| 70 72 69 6d 69 74 69 76 | 65 26 23 32 36 37 3b 3c |primitiv|e&#267;<|
|00000450| 2f 54 54 3e 20 77 68 69 | 63 68 20 63 6f 6e 74 61 |/TT> whi|ch conta|
|00000460| 69 6e 73 20 74 68 65 20 | 6c 69 73 74 20 6f 66 20 |ins the |list of |
|00000470| 61 6c 6c 20 74 68 65 20 | 70 72 69 6d 69 74 69 76 |all the |primitiv|
|00000480| 65 73 20 6f 66 20 74 68 | 65 20 63 6f 72 65 0a 69 |es of th|e core.i|
|00000490| 6e 74 65 72 70 72 65 74 | 65 72 2e 20 49 66 20 74 |nterpret|er. If t|
|000004a0| 68 65 20 53 63 68 65 6d | 65 20 63 6f 64 65 20 79 |he Schem|e code y|
|000004b0| 6f 75 20 77 61 6e 74 20 | 74 6f 20 65 78 65 63 75 |ou want |to execu|
|000004c0| 74 65 20 69 73 20 6e 6f | 74 20 61 20 63 61 6c 6c |te is no|t a call|
|000004d0| 20 74 6f 20 61 0a 70 72 | 69 6d 69 74 69 76 65 2c | to a.pr|imitive,|
|000004e0| 20 69 74 20 69 73 20 67 | 65 6e 65 72 61 6c 6c 79 | it is g|enerally|
|000004f0| 20 65 61 73 69 65 72 20 | 74 6f 20 70 75 74 20 79 | easier |to put y|
|00000500| 6f 75 72 20 63 6f 64 65 | 20 69 6e 20 61 20 43 20 |our code| in a C |
|00000510| 73 74 72 69 6e 67 20 61 | 6e 64 20 63 61 6c 6c 20 |string a|nd call |
|00000520| 74 68 65 20 43 0a 66 75 | 6e 63 74 69 6f 6e 20 53 |the C.fu|nction S|
|00000530| 54 6b 5f 65 76 61 6c 5f | 43 5f 73 74 72 69 6e 67 |Tk_eval_|C_string|
|00000540| 2e 20 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |. This f|unction |
|00000550| 74 61 6b 65 73 20 74 77 | 6f 20 70 61 72 61 6d 65 |takes tw|o parame|
|00000560| 74 65 72 73 3a 20 74 68 | 65 20 73 74 72 69 6e 67 |ters: th|e string|
|00000570| 0a 74 6f 20 65 76 61 6c | 75 61 74 65 20 61 6e 64 |.to eval|uate and|
|00000580| 20 74 68 65 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 | the env|ironment|
|00000590| 20 69 6e 20 77 68 69 63 | 68 20 65 76 61 6c 75 61 | in whic|h evalua|
|000005a0| 74 69 6f 6e 20 6d 75 73 | 74 20 74 61 6b 65 20 70 |tion mus|t take p|
|000005b0| 6c 61 63 65 2e 20 41 73 | 20 66 6f 72 20 3c 54 54 |lace. As| for <TT|
|000005c0| 3e 53 54 6b 5f 65 76 61 | 6c 3c 2f 54 54 3e 2c 20 |>STk_eva|l</TT>, |
|000005d0| 61 20 4e 49 4c 20 76 61 | 6c 75 65 20 66 6f 72 20 |a NIL va|lue for |
|000005e0| 74 68 65 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |the envi|ronment |
|000005f0| 64 65 6e 6f 74 65 73 20 | 74 68 65 20 67 6c 6f 62 |denotes |the glob|
|00000600| 61 6c 0a 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 2e 20 |al.envir|onment. |
|00000610| 53 75 70 70 6f 73 65 2c | 20 66 6f 72 20 69 6e 73 |Suppose,| for ins|
|00000620| 74 61 6e 63 65 2c 20 74 | 68 61 74 20 79 6f 75 20 |tance, t|hat you |
|00000630| 68 61 76 65 20 61 6c 72 | 65 61 64 79 20 77 72 69 |have alr|eady wri|
|00000640| 74 74 65 6e 20 69 6e 20 | 53 63 68 65 6d 65 20 74 |tten in |Scheme t|
|00000650| 68 65 0a 3c 54 54 3e 66 | 61 63 74 3c 2f 54 54 3e |he.<TT>f|act</TT>|
|00000660| 20 70 72 6f 63 65 64 75 | 72 65 3b 20 65 76 61 6c | procedu|re; eval|
|00000670| 75 61 74 69 6e 67 20 74 | 68 65 20 66 61 63 74 6f |uating t|he facto|
|00000680| 72 69 61 6c 20 6f 66 20 | 31 30 20 63 61 6e 20 62 |rial of |10 can b|
|00000690| 65 20 64 6f 6e 65 20 69 | 6e 20 43 20 77 69 74 68 |e done i|n C with|
|000006a0| 3a 0a 3c 42 52 3e 0a 3c | 49 4d 47 0a 20 20 53 54 |:.<BR>.<|IMG. ST|
|000006b0| 59 4c 45 3d 22 22 20 53 | 52 43 3d 22 69 6d 67 31 |YLE="" S|RC="img1|
|000006c0| 39 2e 70 6e 67 22 0a 20 | 41 4c 54 3d 22 5c 62 65 |9.png". |ALT="\be|
|000006d0| 67 69 6e 7b 43 6f 64 65 | 7d 0a 5c 62 65 67 69 6e |gin{Code|}.\begin|
|000006e0| 7b 6c 69 73 74 69 6e 67 | 7d 5b 32 30 30 5d 7b 32 |{listing|}[200]{2|
|000006f0| 7d 0a 53 54 6b 5f 65 76 | 61 6c 5f 73 74 72 69 6e |}.STk_ev|al_strin|
|00000700| 67 28 27 27 28 66 61 63 | 74 20 31 30 29 27 27 2c |g(''(fac|t 10)'',|
|00000710| 20 4e 49 4c 29 3b 0a 5c | 65 6e 64 7b 6c 69 73 74 | NIL);.\|end{list|
|00000720| 69 6e 67 7d 5c 65 6e 64 | 7b 43 6f 64 65 7d 22 3e |ing}\end|{Code}">|
|00000730| 0a 3c 42 52 3e 0a 54 68 | 69 73 20 63 61 6c 6c 20 |.<BR>.Th|is call |
|00000740| 72 65 74 75 72 6e 73 20 | 61 20 70 6f 69 6e 74 65 |returns |a pointe|
|00000750| 72 20 6f 6e 20 61 20 53 | 63 68 65 6d 65 20 6f 62 |r on a S|cheme ob|
|00000760| 6a 65 63 74 20 28 61 20 | 3c 54 54 3e 53 43 4d 3c |ject (a |<TT>SCM<|
|00000770| 2f 54 54 3e 20 70 6f 69 | 6e 74 65 72 29 20 63 6f |/TT> poi|nter) co|
|00000780| 6e 74 61 69 6e 69 6e 67 | 0a 74 68 65 20 72 65 73 |ntaining|.the res|
|00000790| 75 6c 74 20 6f 66 20 74 | 68 65 20 65 76 61 6c 75 |ult of t|he evalu|
|000007a0| 61 74 69 6f 6e 2e 20 49 | 66 20 61 6e 20 65 72 72 |ation. I|f an err|
|000007b0| 6f 72 20 6f 63 63 75 72 | 73 20 64 75 72 69 6e 67 |or occur|s during|
|000007c0| 20 65 76 61 6c 75 61 74 | 69 6f 6e 2e 20 49 74 20 | evaluat|ion. It |
|000007d0| 69 73 0a 73 69 67 6e 61 | 6c 65 64 20 74 6f 20 74 |is.signa|led to t|
|000007e0| 68 65 20 75 73 65 72 20 | 61 6e 64 20 74 68 65 20 |he user |and the |
|000007f0| 63 6f 6e 73 74 61 6e 74 | 20 4e 55 4c 4c 20 69 73 |constant| NULL is|
|00000800| 20 72 65 74 75 72 6e 65 | 64 20 62 79 20 3c 54 54 | returne|d by <TT|
|00000810| 3e 53 54 6b 5f 65 76 61 | 6c 5f 73 74 72 69 6e 67 |>STk_eva|l_string|
|00000820| 3c 2f 54 54 3e 2e 0a 0a | 3c 50 3e 0a 0a 3c 48 52 |</TT>...|<P>..<HR|
|00000830| 3e 0a 0a 3c 2f 42 4f 44 | 59 3e 0a 3c 2f 48 54 4d |>..</BOD|Y>.</HTM|
|00000840| 4c 3e 0a | |L>. | |
+--------+-------------------------+-------------------------+--------+--------+