Changeset 15896 in project


Ignore:
Timestamp:
09/15/09 08:40:50 (10 years ago)
Author:
iraikov
Message:

merged manual from wiki

Location:
chicken/trunk/manual
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/manual

  • chicken/trunk/manual/Deviations from the standard

    r15321 r15896  
    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/trunk/manual/Modules and macros

    r15794 r15896  
    434434are defined and used:
    435435
    436 ;; hello.scm
    437 
    438 (module test (hello greet)
    439   (import scheme)
    440 
    441   (define-syntax greet
    442     (syntax-rules ()
    443       ((_ whom)
    444        (begin
    445         (display "Hello, ")
    446         (display whom)
    447         (display " !\n") ) ) ) )
    448 
    449   (define (hello)
    450     (greet "world") )  )
     436 ;; hello.scm
     437 
     438 (module test (hello greet)
     439   (import scheme)
     440 
     441   (define-syntax greet
     442     (syntax-rules ()
     443       ((_ whom)
     444        (begin
     445          (display "Hello, ")
     446          (display whom)
     447          (display " !\n") ) ) ) )
     448 
     449   (define (hello)
     450     (greet "world") )  )
    451451
    452452The module {{test}} exports one value ({{hello}}) and one syntax
  • chicken/trunk/manual/Non-standard macros and special forms

    r15794 r15896  
    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/trunk/manual/Non-standard read syntax

    r13683 r15896  
    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/trunk/manual/Parameters

    r13694 r15896  
    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/trunk/manual/Supported language

    r13740 r15896  
    11[[tags: manual]]
    2 [[toc:]]
    32
    43== Supported language
  • chicken/trunk/manual/Unit data-structures

    r15813 r15896  
    589589 [procedure] (noop X ...)
    590590
    591 Ignores it's arguments, does nothing and returns an unspecified value.
     591Ignores its arguments, does nothing and returns an unspecified value.
    592592
    593593
     
    604604 [procedure] (left-section PROC ARG0 ...)
    605605
    606 Returns a procedure that partially applies some of its' arguments starting from the left.
     606Returns a procedure that partially applies some of its arguments starting from the left.
    607607
    608608{{PROC}} a procedure.
     
    615615 [procedure] (right-section PROC ARG0 ...)
    616616
    617 Returns a procedure that partially applies some of its' arguments starting from the right.
     617Returns a procedure that partially applies some of its arguments starting from the right.
    618618
    619619{{PROC}} a procedure.
  • chicken/trunk/manual/Unit extras

    r13831 r15896  
    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/trunk/manual/Unit library

    r15600 r15896  
    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/trunk/manual/Unit utils

    r15708 r15896  
    8282The initial default options are {{-scrutinize -O2 -d2}}.
    8383
     84=== Shell argument quoting
    8485
    85 ---
     86==== qs
     87
     88 [procedure] (qs STRING [PLATFORM])
     89
     90Escapes {{STRING}} suitably for passing to a shell command on {{PLATFORM}}.
     91{{PLATFORM}} defaults to the value of {{(build-platform)}} and indicates in
     92which style the argument should be quoted. On Windows systems, the string
     93is simply enclosed in double-quote ({{"}}) characters, on UNIXish systems,
     94characters that would have a special meaning to the shell are escaped
     95using backslash ({{\}}).
     96
    8697Previous: [[Unit posix]]
    8798
  • chicken/trunk/manual/Using the compiler

    r15773 r15896  
    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
     
    462462
    463463---
    464 Previous: [[The User's Manual]]
     464Previous: [[Basic mode of operation]]
    465465
    466466Next: [[Using the interpreter]]
  • chicken/trunk/manual/Using the interpreter

    r15773 r15896  
    8787to standalone executables (don't forget to declare used library units).
    8888
    89 CHICKEN supports writing shell scripts in Scheme for these platforms as well,
     89CHICKEN supports writing shell scripts in Scheme for other platforms as well,
    9090using a slightly different approach. The first example would look like
    9191this on Windows:
     
    103103accept more than 8 arguments.
    104104
    105 Since it is sometimes useful to run a script into the interpreter without actually running it
     105Since it is sometimes useful to run a script in the interpreter without actually executing it
    106106(for example to test specific parts of it), the option {{-ss}} can be used as an alternative to {{-script}}.
    107107{{-ss PATHNAME}} is equivalent to {{-script PATHNAME}} but invokes {{(main (command-line-arguments))}}
     
    219219 #;1> (define-record-type point (make-point x y) point?
    220220        (x point-x)
    221         (y point-y))
     221        (y point-y))
    222222 #;2> (set-describer! 'point
    223223        (lambda (pt o)
Note: See TracChangeset for help on using the changeset viewer.