Changeset 15898 in project for chicken


Ignore:
Timestamp:
09/15/09 08:46:55 (10 years ago)
Author:
iraikov
Message:

merged manual from trunk into prerelease branch

Location:
chicken/branches/prerelease/manual
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/prerelease/manual

  • chicken/branches/prerelease/manual/Deviations from the standard

    r15844 r15898  
    11[[tags: manual]]
    22
    3 == Deviations from the standard
     3== Confirmed deviations
    44
    55Identifiers are by default case-sensitive (see
     
    77
    88[4.1.3] The maximal number of arguments that may be passed to a
    9 compiled procedure or macro is 120.  A macro-definition that has a
    10 single rest-parameter can have any number of arguments. 
     9compiled procedure or macro is 120. (However, a macro-definition
     10that has a single rest-parameter can have any number of arguments.)
     11Likewise, [6.4] the maximum number of values that can be passed
     12to continuations captured using {{call-with-current-continuation}}
     13is 120.  This is an implementation restriction that is unlikely
     14to be lifted.
     15
     16[6.2.5] The {{numerator}} and {{denominator}} procedures cannot be
     17applied to inexact numbers, and the procedure {{rationalize}} is not
     18implemented at all.  This will be fixed in a later release.
     19
     20[6.2.4] The runtime system uses the numerical string-conversion
     21routines of the underlying C library and so does only understand
     22standard (C-library) syntax for floating-point constants.  Consequently,
     23the procedures [6.2.6] {{string->number}}, [6.6.2] {{read}},
     24[6.6.3] {{write}}, and [6.6.3] {{display}} do not obey
     25read/write invariance to inexact numbers.
     26
     27[6.5] Code evaluated in {{scheme-report-environment}} or
     28{{null-environment}} still sees non-standard syntax.
     29
     30== Unconfirmed deviations
     31
     32[6.6.2] The procedure {{char-ready?}} always returns {{#t}} for
     33terminal ports.
     34
     35== Doubtful deviations
    1136
    1237[4.2.2] {{letrec}} does evaluate the initial values for the bound
     
    3055      (cons x y) ) )
    3156
     57It is unclear whether R5RS permits this behavior or not; in any case,
     58this only affects letrecs where the bound values are not
     59lambda-expressions.
     60
     61== Non-deviations that might surprise you
     62
    3263[6.1] {{equal?}} compares all structured data recursively, while R5RS
    3364specifies that {{eqv?}} is used for data other than pairs, strings and
    34 vectors.
     65vectors.  However, R5RS does not dictate the treatment of data types
     66that are not specified by R5RS.
    3567
    36 [6.2.4] The runtime system uses the numerical string-conversion
    37 routines of the underlying C library and so does only understand
    38 standard (C-library) syntax for floating-point constants.
    39 
    40 [6.2.5] There is no built-in support for rationals, complex numbers or
    41 extended-precision integers (bignums). The routines {{complex?}},
    42 {{real?}} and {{rational?}} are identical to the standard procedure
    43 {{number?}}. The procedures {{rationalize}}, {{make-rectangular}} and
    44 {{make-polar}} are not implemented. Fixnums are limited to
     68[6.2.5] There is no built-in support for exact rationals, complex
     69numbers or extended-precision integers (bignums). The routines
     70{{complex?}}, {{real?}} and {{rational?}} are identical to
     71the standard procedure {{number?}}. The procedures {{make-rectangular}}
     72and {{make-polar}} are not implemented. Fixnums are limited to
    4573±2<nowiki><sup>30</sup></nowiki> (or ±2<nowiki><sup>62</sup></nowiki>
    46 on 64-bit hardware). Support for extended numbers is available as a
    47 separate package, provided the GNU multiprecision library is
    48 installed.
     74on 64-bit hardware).  Support for the full numeric tower is available
     75as a separate package, provided the GNU multiprecision library is installed.
    4976
    5077[6.2.6] The procedure {{string->number}} does not obey read/write
     
    6592
    6693[6.6.4] The {{transcript-on}} and {{transcript-off}} procedures are
    67 not implemented.
     94not implemented.  R5RS does not require them.
    6895
    6996---
  • chicken/branches/prerelease/manual/Modules and macros

    r15101 r15898  
    416416are defined and used:
    417417
    418 ;; hello.scm
    419 
    420 (module test (hello greet)
    421   (import scheme)
    422 
    423   (define-syntax greet
    424     (syntax-rules ()
    425       ((_ whom)
    426        (begin
    427         (display "Hello, ")
    428         (display whom)
    429         (display " !\n") ) ) ) )
    430 
    431   (define (hello)
    432     (greet "world") )  )
     418 ;; hello.scm
     419 
     420 (module test (hello greet)
     421   (import scheme)
     422 
     423   (define-syntax greet
     424     (syntax-rules ()
     425       ((_ whom)
     426        (begin
     427          (display "Hello, ")
     428          (display whom)
     429          (display " !\n") ) ) ) )
     430 
     431   (define (hello)
     432     (greet "world") )  )
    433433
    434434The module {{test}} exports one value ({{hello}}) and one syntax
  • chicken/branches/prerelease/manual/Non-standard macros and special forms

    r13859 r15898  
    189189 [syntax] (let-values (((NAME ...) EXP) ...) BODY ...)
    190190
    191 Binds multiple variables to the result values of {{EXP ...}}.
     191SRFI 11.  Binds multiple variables to the result values of {{EXP ...}}.
    192192All variables are bound simultaneously.
    193193
     
    196196 [syntax] (let*-values (((NAME ...) EXP) ...) BODY ...)
    197197
    198 Binds multiple variables to the result values of {{EXP ...}}.
     198SRFI 11.  Binds multiple variables to the result values of {{EXP ...}}.
    199199The variables are bound sequentially.
    200200
  • chicken/branches/prerelease/manual/Non-standard read syntax

    r13859 r15898  
    3838
    3939 #:SYMBOL
     40 SYMBOL:
     41 :SYMBOL
    4042
    41 Syntax for keywords. Keywords are symbols that evaluate to themselves, and as such don't have to be quoted.
     43Syntax for keywords. Keywords are symbols that evaluate to themselves, and as such don't have to be quoted.  Either {{SYMBOL:}} or {{:SYMBOL}} is accepted, depending on the setting of the {{keyword-style}} parameter, but never both.  {{#:SYMBOL}} is always accepted.
    4244
    4345=== Multiline String Constant
  • chicken/branches/prerelease/manual/Parameters

    r13859 r15898  
    9393=== keyword-style
    9494Enables alternative keyword syntax, where {{STYLE}} may be either
    95 {{#:prefix}} (as in Common Lisp) or {{#:suffix}} (as in DSSSL).
    96 Any other value disables the alternative syntaxes.
     95{{#:prefix}} (as in Common Lisp), which recognizes symbols beginning
     96with a colon as keywords, or {{#:suffix}} (as in DSSSL), which recognizes
     97symbols ending with a colon as keywords.
     98Any other value disables the alternative syntaxes.  In the interpreter
     99the default is {{#:suffix}}.
    97100
    98101
  • chicken/branches/prerelease/manual/Supported language

    r13859 r15898  
    11[[tags: manual]]
    2 [[toc:]]
    32
    43== Supported language
  • chicken/branches/prerelease/manual/Unit data-structures

    r14954 r15898  
    569569 [procedure] (noop X ...)
    570570
    571 Ignores it's arguments, does nothing and returns an unspecified value.
     571Ignores its arguments, does nothing and returns an unspecified value.
    572572
    573573
     
    584584 [procedure] (left-section PROC ARG0 ...)
    585585
    586 Returns a procedure that partially applies some of its' arguments starting from the left.
     586Returns a procedure that partially applies some of its arguments starting from the left.
    587587
    588588{{PROC}} a procedure.
     
    595595 [procedure] (right-section PROC ARG0 ...)
    596596
    597 Returns a procedure that partially applies some of its' arguments starting from the right.
     597Returns a procedure that partially applies some of its arguments starting from the right.
    598598
    599599{{PROC}} a procedure.
  • chicken/branches/prerelease/manual/Unit extras

    r13859 r15898  
    9898
    9999
    100 === Input/Output extensions
     100=== Pretty-printing
     101
    101102
    102103==== pretty-print
     
    112113(Parameter) Specifies the maximal line-width for pretty printing, after which line
    113114wrap will occur.
     115
     116
     117=== Input/Output extensions
    114118
    115119==== read-byte
  • chicken/branches/prerelease/manual/Unit library

    r15101 r15898  
    328328The parameter {{keyword-style}} and the compiler/interpreter option
    329329{{-keyword-style}} can be used to allow an additional keyword
    330 syntax, either compatible to Common LISP, or to DSSSL.
    331 
     330syntax, either compatible to Common LISP, or to DSSSL.  As long as this
     331parameter is set to {{#:suffix}}, Chicken conforms to
     332[[http://srfi.schemers.org/srfi-88/srfi-88.html|SRFI-88]].
    332333
    333334
  • chicken/branches/prerelease/manual/Unit utils

    r15844 r15898  
    111111The initial default options are {{-scrutinize -O2 -d2}}.
    112112
     113=== Shell argument quoting
    113114
    114 ---
     115==== qs
     116
     117 [procedure] (qs STRING [PLATFORM])
     118
     119Escapes {{STRING}} suitably for passing to a shell command on {{PLATFORM}}.
     120{{PLATFORM}} defaults to the value of {{(build-platform)}} and indicates in
     121which style the argument should be quoted. On Windows systems, the string
     122is simply enclosed in double-quote ({{"}}) characters, on UNIXish systems,
     123characters that would have a special meaning to the shell are escaped
     124using backslash ({{\}}).
     125
    115126Previous: [[Unit posix]]
    116127
  • chicken/branches/prerelease/manual/Using the compiler

    r15844 r15898  
    77dependent makefiles, shell-scripts or batch-files should perform
    88any necessary steps before and after invocation of {{chicken}}.
    9 A program named {{csc}} provides a much simpler
     9A program named {{csc}} provides a more convenient and concise
    1010interface to the Scheme- and C-compilers and linker. Enter
    1111
     
    458458
    459459---
    460 Previous: [[The User's Manual]]
     460Previous: [[Basic mode of operation]]
    461461
    462462Next: [[Using the interpreter]]
  • chicken/branches/prerelease/manual/Using the interpreter

    r15101 r15898  
    8585to standalone executables (don't forget to declare used library units).
    8686
    87 CHICKEN supports writing shell scripts in Scheme for these platforms as well,
     87CHICKEN supports writing shell scripts in Scheme for other platforms as well,
    8888using a slightly different approach. The first example would look like
    8989this on Windows:
     
    101101accept more than 8 arguments.
    102102
    103 Since it is sometimes useful to run a script into the interpreter without actually running it
     103Since it is sometimes useful to run a script in the interpreter without actually executing it
    104104(for example to test specific parts of it), the option {{-ss}} can be used as an alternative to {{-script}}.
    105105{{-ss PATHNAME}} is equivalent to {{-script PATHNAME}} but invokes {{(main (command-line-arguments))}}
     
    217217 #;1> (define-record-type point (make-point x y) point?
    218218        (x point-x)
    219         (y point-y))
     219        (y point-y))
    220220 #;2> (set-describer! 'point
    221221        (lambda (pt o)
Note: See TracChangeset for help on using the changeset viewer.