- Timestamp:
- 03/11/09 17:21:38 (11 years ago)
- Location:
- chicken/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
chicken/trunk/manual/Extensions to the standard
r13683 r13686 3 3 == Extensions to the standard 4 4 5 [2.1] Identifiers may contain special characters if delimited with 5 === [2.1] 6 7 Identifiers may contain special characters if delimited with 6 8 {{| ... |}}. 7 9 8 [2.3] The brackets {{[ ... ]}} and the braces {{ { ... } }} are 10 === [2.3] 11 12 The brackets {{[ ... ]}} and the braces {{ { ... } }} are 9 13 provided as an alternative syntax for {{( ... )}}. A number of reader 10 14 extensions is provided. See [[Non-standard read syntax]]. 11 15 12 [4] Numerous non-standard macros are provided. See 16 === [4] 17 18 Numerous non-standard macros are provided. See 13 19 [[Non-standard macros and special forms]] for more information. 14 20 15 [4.1.4] Extended DSSSL style lambda lists are supported. DSSSL parameter lists are defined by the following grammar: 21 === [4.1.4] 22 23 Extended DSSSL style lambda lists are supported. DSSSL parameter lists are defined by the following grammar: 16 24 17 25 <parameter-list> ==> <required-parameter>* … … 51 59 3 4 5 i: 6 i: 7) => (3 4 5 i: 6 j: 1) 52 60 53 [4.1.6] {{set!}} for unbound toplevel variables is allowed. {{set! (PROCEDURE ...) ...)}} 61 === [4.1.6] 62 63 {{set!}} for unbound toplevel variables is allowed. {{set! (PROCEDURE ...) ...)}} 54 64 is supported, as CHICKEN implements [[http://srfi.schemers.org/srfi-17/srfi-17.html|SRFI-17]]. 55 [4.2.1] The {{cond}} form supports [[http://srfi.schemers.org/srfi-61|SRFI-61]]. 56 57 [4.2.2] It is allowed for initialization values of bindings in a {{letrec}} 65 66 === [4.2.1] 67 68 The {{cond}} form supports [[http://srfi.schemers.org/srfi-61|SRFI-61]]. 69 70 === [4.2.2] 71 72 It is allowed for initialization values of bindings in a {{letrec}} 58 73 construct to refer to previous variables in the same set of bindings, so 59 74 … … 64 79 is allowed and returns {{123}}. 65 80 66 [4.2.3] {{(begin)}} is allowed in non-toplevel contexts and evaluates 81 === [4.2.3] 82 83 {{(begin)}} is allowed in non-toplevel contexts and evaluates 67 84 to an unspecified value. 68 85 69 [4.2.5] Delayed expressions may return multiple values. 70 71 [5.2.2] CHICKEN extends standard semantics by allowing internal definitions 86 === [4.2.5] 87 88 Delayed expressions may return multiple values. 89 90 === [5.2.2] 91 92 CHICKEN extends standard semantics by allowing internal definitions 72 93 everywhere, and not only at the beginning of a body. A set of internal definitions 73 94 is equivalent to a {{letrec}} form enclosing all following expressions … … 90 111 the expression. 91 112 92 [5.2] {{define}} with a single argument is allowed and initializes the toplevel or local binding 113 === [5.2] 114 115 {{define}} with a single argument is allowed and initializes the toplevel or local binding 93 116 to an unspecified value. CHICKEN supports ''curried'' definitions, where the variable name 94 117 may also be a list specifying a name and a nested lambda list. So … … 100 123 (define (make-adder x) (lambda (y) (+ x y))) 101 124 102 [6] CHICKEN provides numerous non-standard procedures. See the manual 125 === [6] 126 127 CHICKEN provides numerous non-standard procedures. See the manual 103 128 sections on library units for more information. 104 129 105 [6.2.4] The special IEEE floating-point numbers ''+nan'', ''+inf'' and ''-inf'' 130 === [6.2.4] 131 132 The special IEEE floating-point numbers ''+nan'', ''+inf'' and ''-inf'' 106 133 are supported, as is negative zero. 107 134 108 [6.3.4] User defined character names are supported. See 135 === [6.3.4] 136 137 User defined character names are supported. See 109 138 {{char-name}}. Characters can be given 110 139 in hexadecimal notation using the ''#\xXX'' syntax where ''XX'' specifies the … … 115 144 {{#\vtab}}, {{#\nul}}, {{#\page}}, {{#\esc}}, {{#\delete}} and {{#\backspace}}. 116 145 117 [6.3.5] CHICKEN supports special characters preceded with 146 === [6.3.5] 147 148 CHICKEN supports special characters preceded with 118 149 a backslash ''\'' in quoted string 119 150 constants. ''\n'' denotes the newline-character, … … 127 158 of the string. 128 159 129 [6.4] {{force}} called with an argument that is not a promise returns 160 === [6.4] 161 162 {{force}} called with an argument that is not a promise returns 130 163 that object unchanged. Captured continuations can be safely invoked 131 164 inside before- and after-thunks of a {{dynamic-wind}} form and … … 138 171 explicit continuations (created with {{call-with-current-continuation}}). 139 172 140 [6.5] The second argument to {{eval}} is optional and 173 === [6.5] 174 175 The second argument to {{eval}} is optional and 141 176 defaults to the value of {{(interaction-environment)}}. 142 177 {{scheme-report-environment}} and {{null-environment}} accept … … 145 180 bindings may be introduced. 146 181 147 [6.6] The ''tilde'' character ({{~}}) is automatically expanded in pathnames. 182 === [6.6] 183 184 The ''tilde'' character ({{~}}) is automatically expanded in pathnames. 148 185 Additionally, if a pathname starts with {{$VARIABLE...}}, then the prefix is replaced 149 186 by the value of the given environment variable. 150 187 151 [6.6.1] if the procedures {{current-input-port}} and 188 === [6.6.1] 189 190 If the procedures {{current-input-port}} and 152 191 {{current-output-port}} are called with an argument (which should 153 192 be a port), then that argument is selected as the new current input- and … … 161 200 {{#:append}}. 162 201 163 [6.7] The {{exit}} procedure exits a program right away and does ''not'' invoke pending {{dynamic-wind}} thunks. 202 === [6.7] 203 204 The {{exit}} procedure exits a program right away and does ''not'' invoke pending {{dynamic-wind}} thunks. 164 205 165 206 --- -
chicken/trunk/manual/Unit expand
r13683 r13686 49 49 Previous: [[Unit library]] 50 50 51 Next: [[Unit expand]]51 Next: [[Unit data-structures]] -
chicken/trunk/manual/Unit library
r13683 r13686 12 12 ==== add1/sub1 13 13 14 ; [procedure] (add1 N) 15 ; [procedure] (sub1 N) 14 <procedure>(add1 N)</procedure> 15 <procedure>(sub1 N)</procedure> 16 16 17 17 Adds/subtracts 1 from {{N}}. … … 26 26 platforms). 27 27 28 ; [procedure] (bitwise-and N1 ...) 29 ; [procedure] (bitwise-ior N1 ...) 30 ; [procedure] (bitwise-xor N1 ...) 31 ; [procedure] (bitwise-not N) 32 ; [procedure] (arithmetic-shift N1 N2) 28 <procedure>(bitwise-and N1 ...)</procedure> 29 <procedure>(bitwise-ior N1 ...)</procedure> 30 <procedure>(bitwise-xor N1 ...)</procedure> 31 <procedure>(bitwise-not N)</procedure> 32 <procedure>(arithmetic-shift N1 N2)</procedure> 33 33 34 34 ==== bit-set? … … 51 51 respectively. 52 52 53 ; [procedure] (fx+ N1 N2) 54 ; [procedure] (fx- N1 N2) 55 ; [procedure] (fx* N1 N2) 56 ; [procedure] (fx/ N1 N2) 57 ; [procedure] (fxmod N1 N2) 58 ; [procedure] (fxneg N) 59 ; [procedure] (fxmin N1 N2) 60 ; [procedure] (fxmax N1 N2) 61 ; [procedure] (fx= N1 N2) 62 ; [procedure] (fx> N1 N2) 63 ; [procedure] (fx< N1 N2) 64 ; [procedure] (fx>= N1 N2) 65 ; [procedure] (fx<= N1 N2) 66 ; [procedure] (fxand N1 N2) 67 ; [procedure] (fxior N1 N2) 68 ; [procedure] (fxxor N1 N2) 69 ; [procedure] (fxnot N) 70 ; [procedure] (fxshl N1 N2) 71 ; [procedure] (fxshr N1 N2) 53 <procedure>(fx+ N1 N2)</procedure> 54 <procedure>(fx- N1 N2)</procedure> 55 <procedure>(fx* N1 N2)</procedure> 56 <procedure>(fx/ N1 N2)</procedure> 57 <procedure>(fxmod N1 N2)</procedure> 58 <procedure>(fxneg N)</procedure> 59 <procedure>(fxmin N1 N2)</procedure> 60 <procedure>(fxmax N1 N2)</procedure> 61 <procedure>(fx= N1 N2)</procedure> 62 <procedure>(fx> N1 N2)</procedure> 63 <procedure>(fx< N1 N2)</procedure> 64 <procedure>(fx>= N1 N2)</procedure> 65 <procedure>(fx<= N1 N2)</procedure> 66 <procedure>(fxand N1 N2)</procedure> 67 <procedure>(fxior N1 N2)</procedure> 68 <procedure>(fxxor N1 N2)</procedure> 69 <procedure>(fxnot N)</procedure> 70 <procedure>(fxshl N1 N2)</procedure> 71 <procedure>(fxshr N1 N2)</procedure> 72 72 73 73 ==== fixnum? … … 91 91 in unsafe mode can crash the system. 92 92 93 ; [procedure] (flonum? X) 94 ; [procedure] (fp+ X Y) 95 ; [procedure] (fp- X Y) 96 ; [procedure] (fp* X Y) 97 ; [procedure] (fp/ X Y) 98 ; [procedure] (fpneg X) 99 ; [procedure] (fpmin X Y) 100 ; [procedure] (fpmax X Y) 101 ; [procedure] (fp= X Y) 102 ; [procedure] (fp> X Y) 103 ; [procedure] (fp< X Y) 104 ; [procedure] (fp>= X Y) 105 ; [procedure] (fp<= X Y) 93 <procedure>(flonum? X)</procedure> 94 <procedure>(fp+ X Y)</procedure> 95 <procedure>(fp- X Y)</procedure> 96 <procedure>(fp* X Y)</procedure> 97 <procedure>(fp/ X Y)</procedure> 98 <procedure>(fpneg X)</procedure> 99 <procedure>(fpmin X Y)</procedure> 100 <procedure>(fpmax X Y)</procedure> 101 <procedure>(fp= X Y)</procedure> 102 <procedure>(fp> X Y)</procedure> 103 <procedure>(fp< X Y)</procedure> 104 <procedure>(fp>= X Y)</procedure> 105 <procedure>(fp<= X Y)</procedure> 106 106 107 107 ==== flonum? -
chicken/trunk/scripts/wiki2html.scm
r13683 r13686 10 10 ;;; inline elements 11 11 12 (define +code+ '(: #\{ #\{ (submatch (*? (~ #\}))) #\} #\}))12 (define +code+ '(: #\{ #\{ (submatch (*? any)) #\} #\})) 13 13 (define +bold+ '(: (= 3 #\') (submatch (* (~ #\'))) (= 3 #\'))) 14 14 (define +italic+ '(: (= 2 #\') (submatch (* (~ #\'))) (= 2 #\'))) … … 29 29 (define +header+ '(: (submatch (>= 2 #\=)) (* space) (submatch (* any)))) 30 30 (define +pre+ '(: (>= 1 space) (submatch (* any)))) 31 (define +d-list+ '(: (* space) #\; (submatch (*? any)) #\space #\: #\space (submatch (* any)))) 31 32 (define +d-list+ 33 '(: (* space) #\; (submatch (*? any)) #\space #\: #\space (submatch (* any)))) 34 32 35 (define +u-list+ '(: (* space) (submatch (>= 1 #\*)) (* space) (submatch (* any)))) 33 36 (define +o-list+ '(: (* space) (submatch (>= 1 #\*)) #\# (* space) (submatch (* any)))) … … 123 126 (set! *list-continuation* #t) 124 127 (fprintf out "<dt>~a</dt><dd>~a</dd>~%" 125 (inline (second m)) (inline ( third m)))))128 (inline (second m)) (inline (or (third m) ""))))) 126 129 ((string-match (rx +u-list+) ln) => 127 130 (lambda (m)
Note: See TracChangeset
for help on using the changeset viewer.