~ chicken-core (chicken-5) /manual/Deviations from the standard
Trap1[[tags: manual]]23== Confirmed deviations from R5RS45Identifiers are by default case-sensitive (see [[Using the compiler]]).67=== Number of arguments to procedures and macros89The maximal number of arguments that may be passed to a10compiled procedure or macro is limited to around 1000.11Likewise, the maximum number of values that can be passed12to continuations captured using {{call-with-current-continuation}}13is 1000. This is an implementation restriction that is unlikely14to be lifted.151617=== Numeric string-conversion considerations1819In some cases the runtime system uses the numerical string-conversion20routines of the underlying C library. Consequently, the procedures21{{string->number}}, {{read}}, {{write}}, and {{display}} do not obey22read/write invariance for inexact numbers.232425=== Environments and non-standard syntax2627In addition to the standard bindings, {{scheme-report-environment}} and28{{null-environment}} contain additional non-standard bindings for the29following syntactic forms: {{import}}, {{require-extension}},30{{require-library}}, {{begin-for-syntax}}, {{export}}, {{module}},31{{cond-expand}}, {{syntax}}, {{reexport}}, {{import-for-syntax}}.3233=== Assignment to unbound variables3435{{set!}} may assign values to unbound variables; this creates a new36top-level binding for the variable, as if {{define}} had been used37instead. This extension must be used with care, as typos might cause38unexpected results:3940<enscript highlight="scheme">41> (let ((frob 5))42 (set! frov (+ frob 1)) ; oops!43 frob)44> 545> frov46> 647</enscript>4849== Unconfirmed deviations5051=== {{char-ready?}}5253The procedure {{char-ready?}} always returns {{#t}} for54terminal ports.55565758== Doubtful deviations5960=== {{letrec}}6162{{letrec}} does evaluate the initial values for the bound63variables sequentially and not in parallel, that is:6465<enscript highlight="scheme">66(letrec ((x 1) (y 2)) (cons x y))67</enscript>6869is equivalent to7071<enscript highlight="scheme">72(let ((x (void)) (y (void)))73 (set! x 1)74 (set! y 2)75 (cons x y) )76</enscript>7778where R5RS requires7980<enscript highlight="scheme">81(let ((x (void)) (y (void)))82 (let ((tmp1 1) (tmp2 2))83 (set! x tmp1)84 (set! y tmp2)85 (cons x y) ) )86</enscript>8788It is unclear whether R5RS permits this behavior or not; in any case,89this only affects letrecs where the bound values are not90lambda-expressions.919293== Non-deviations that might surprise you9495=== {{let-syntax}} and {{letrec-syntax}}9697{{let-syntax}} and {{letrec-syntax}} introduce a new scope.9899100=== {{equal?}} compares all structured data recursively101102{{equal?}} compares all structured data with the exception of103procedures recursively, while R5RS specifies that {{eqv?}} is used for104data other than pairs, strings and vectors. However, R5RS does not105dictate the treatment of data types that are not specified by R5RS106107108=== {{transcript-on}} and {{transcript-off}} are not implemented109110The {{transcript-on}} and {{transcript-off}} procedures are111not implemented. R5RS does not require them.112113---114Previous: [[Using the compiler]]115116Next: [[Extensions to the standard]]