Changeset 13580 in project
- Timestamp:
- 03/08/09 02:04:40 (11 years ago)
- Location:
- chicken/trunk/manual
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
chicken/trunk/manual/C interface
r13452 r13580 321 321 extern int callout(int, int, int); 322 322 <# 323 323 324 324 (define callout (foreign-safe-lambda int "callout" int int int)) 325 325 326 326 (define-external (callin (scheme-object xyz)) int 327 327 (print "This is 'callin': " xyz) 328 328 123) 329 329 330 330 (print (callout 1 2 3)) 331 331 … … 333 333 #include <stdio.h> 334 334 #include "chicken.h" 335 335 336 336 extern int callout(int, int, int); 337 337 extern int callin(C_word x); 338 338 339 339 int callout(int x, int y, int z) 340 340 { 341 341 C_word *ptr = C_alloc(C_SIZEOF_LIST(3)); 342 342 C_word lst; 343 343 344 344 printf("This is 'callout': %d, %d, %d\n", x, y, z); 345 345 lst = C_list(&ptr, 3, C_fix(x), C_fix(y), C_fix(z)); -
chicken/trunk/manual/Callbacks
r7078 r13580 23 23 Non-local exits leaving the scope of the invocation of a callback from Scheme into C 24 24 will not remove the C call-frame from the stack (and will result in a memory 25 leak). 26 25 leak). '''Note:''' The same applies to 26 SRFI-18 threading, which is implemented with {{call/cc}}; 27 additionally, if you enter one callback, switch threads and then exit 28 a different callback, your program is likely to crash. 27 29 28 30 -
chicken/trunk/manual/Extensions to the standard
r10872 r13580 161 161 {{#:append}}. 162 162 163 [6.7] The {{exit}} procedure exits a program right away and does ''not'' invoke pending {{dynamic-wind}} thunks. 164 163 165 Previous: [[Deviations from the standard]] 164 166 -
chicken/trunk/manual/Non-standard macros and special forms
r12559 r13580 52 52 This is equivalent to {{(require-library ID ...)}} but performs an implicit 53 53 {{import}}, if necessary. 54 This implementation of {{require-extension}} is compliant with [[http://srfi.schemers.org/srfi-55/srfi-55.html|SRFI-55]] 55 (see the [[http://srfi.schemers.org/srfi-55/srfi-55.html|SRFI-55]] document for more information). 54 56 55 57 ==== use -
chicken/trunk/manual/Non-standard read syntax
r5945 r13580 15 15 #;EXPRESSION 16 16 17 Treats {{EXPRESSION}} as a comment. 18 17 Treats {{EXPRESSION}} as a comment. That is, the comment runs through the whole S-expression, regardless of newlines, which saves you from having to comment out every line, or add a newline in the middle of your parens to make the commenting of the last line work, or other things like that. 19 18 === External Representation 20 19 -
chicken/trunk/manual/Parameters
r5945 r13580 4 4 == Parameters 5 5 6 Certain behavior of the interpreter and compiled programs can be7 customized via 'parameters', where aparameter is a procedure of6 Parameters are Chicken's form of dynamic variables, except that they are 7 procedures rather than actual variables. A parameter is a procedure of 8 8 zero or one arguments. To retrieve the value of a parameter call the 9 9 parameter-procedure with zero arguments. To change the setting of the … … 36 36 procedure. The guard procedure should check the value and/or convert it 37 37 to an appropriate form. 38 39 == Built-in parameters 40 41 Certain behavior of the interpreter and compiled programs can be 42 customized via the following built-in parameters: 38 43 39 44 === case-sensitive -
chicken/trunk/manual/The User's Manual
r12920 r13580 5 5 This is the user's manual for the Chicken Scheme compiler, version 4.0.0x5 6 6 7 ; [[ Overview]] : What is Chicken?7 ; [[Getting started]] : What is CHICKEN and how do I use it? 8 8 9 9 ; [[Basic mode of operation]] : Compiling Scheme files. -
chicken/trunk/manual/Unit eval
r11013 r13580 135 135 If {{X}} is a macro-form, expand the macro (and repeat expansion 136 136 until expression is a non-macro form). Returns the resulting expression. 137 138 ==== expand*139 140 [procedure] (expand* X)141 142 If {{X}} is a macro-form, expand the macro. Returns the resulting143 expression.144 137 145 138 ==== undefine-macro!
Note: See TracChangeset
for help on using the changeset viewer.