diff --git a/doc/html/stklos-ref-1.html b/doc/html/stklos-ref-1.html index 4402777c84999e7e6b7bd4d9140f99124c42f7e8..63fb275c9ff19b3a340448b539cb6cd7f7b2c4d7 100644 --- a/doc/html/stklos-ref-1.html +++ b/doc/html/stklos-ref-1.html @@ -15,7 +15,7 @@
- +
Contents

This Html page has been produced by - Skribe.
Last update Fri Oct 12 17:19:42 2018
+ Skribe.
Last update Tue Nov 27 20:54:12 2018 diff --git a/doc/html/stklos-ref-2.html b/doc/html/stklos-ref-2.html index eef2cb562a3d3b75aa68206bd83a2381dcb08bab..d77d440bf95597fcab3fd4179eff1a74888d9851 100644 --- a/doc/html/stklos-ref-2.html +++ b/doc/html/stklos-ref-2.html @@ -15,7 +15,7 @@
- + + + +Note: A rule of thumb is that objects are generally +`equal?` if they print the same.
Contents

### 4.2 Numbers

R5RS description of numbers is quite long and will not be given here. @@ -245,7 +250,7 @@ following inexact numerical constants: `+inf.0` (infinity), `-inf.0` (negative infinity), `+nan.0` (not a number), and `-nan.0` (same as +nan.0).

-
+
 `(number? obj)` R5RS procedure
`(complex? obj)`
`(real? obj)`
`(rational? obj)`
`(integer? obj)`

These numerical type predicates can be applied to any kind of @@ -284,14 +289,14 @@ number, then `(integer? x)` is true if and only if

-
+
 `(exact? z)` R5RS procedure
`(inexact? z)`

These numerical predicates provide tests for the exactness of a quantity. For any Scheme number, precisely one of these predicates is true.

-
+
 `(bignum? x)` STklos procedure

This predicates returns `#t` if `x` is an integer number too large to be @@ -304,7 +309,7 @@ represented with a native integer.

-
+
 `(= z1 z2 z3 ...)` R5RS procedure
`(< x1 x2 x3 ...)`
`(> x1 x2 x3 ...)`
`(<= x1 x2 x3 ...)`
`(>= x1 x2 x3 ...)`

These procedures return `#t` if their arguments are (respectively): @@ -323,7 +328,7 @@ For any finite real number x:

-
+
 `(finite? z)` R5RS procedure
`(infinite? z)`
`(zero? z)`
`(positive? x)`
`(negative? x)`
`(odd? n)`
`(even? n)`

These numerical predicates test a number for a particular property, @@ -337,7 +342,7 @@ returning `#t` or `#f`.

-
+
 `(max x1 x2 ...)` R5RS procedure
`(min x1 x2 ...)`

These procedures return the maximum or minimum of their arguments. @@ -359,7 +364,7 @@ For any real number x: Note: If any argument is inexact, then the result will also be inexact

-
+
 `(+ z1 ...)` R5RS procedure
`(* z1 ...)`

These procedures return the sum or product of their arguments. @@ -387,7 +392,7 @@ inexact

-
+
 `(- z)` R5RS procedure
`(- z1 z2)`
`(/ z)`
`(/ z1 z2 ...)`

With two or more arguments, these procedures return the difference or quotient @@ -407,7 +412,7 @@ they return the additive or multiplicative inverse of their argument.

-
+
 `(abs x)` R5RS procedure

`Abs` returns the absolute value of its argument. @@ -418,7 +423,7 @@ they return the additive or multiplicative inverse of their argument.

-
+
 `(quotient n1 n2)` R5RS procedure
`(remainder n1 n2)`
`(modulo n1 n2)`

These procedures implement number-theoretic (integer) division. n2 should @@ -476,7 +481,7 @@ provided all numbers involved in that computation are exact.

-
+
 `(gcd n1 ...)` R5RS procedure
`(lcm n1 ...)`

These procedures return the greatest common divisor or least common @@ -492,7 +497,7 @@ multiple of their arguments. The result is always non-negative.

-
+
 `(numerator q)` R5RS procedure
`(denominator q)`

These procedures return the numerator or denominator of their argument; the @@ -508,7 +513,7 @@ lowest terms. The denominator is always positive. The denominator of

-
+
 `(floor x)` R5RS procedure
`(ceiling x)`
`(truncate x)`
`(round x)`

These procedures return integers. `Floor` returns the largest integer not @@ -541,7 +546,7 @@ be passed to the `inexact->exact` procedure.

-
+
 `(rationalize x y)` R5RS procedure

Rationalize returns the simplest rational number differing from `x` @@ -562,7 +567,7 @@ simplest rational of all.

-
+
 `(exp z)` R5RS procedure
`(log z)`
`(sin z)`
`(cos z)`
`(tan z)`
`(asin z)`
`(acos z)`
`(atan z)`
`(atan y x)`

These procedures compute the usual transcendental functions. `Log` computes the @@ -578,20 +583,20 @@ The two-argument variant of `atan` computes When it is possible these procedures produce a real result from a real argument.

-
+
 `(sqrt z)` R5RS procedure

Returns the principal square root of `z`. The result will have either positive real part, or zero real part and non-negative imaginary part.

-
+
 `(expt z1 z2)` R5RS procedure

Returns `z1` raised to the power `z2`.

Note: `0z` is 1 if `z = 0` and `0` otherwise.

-
+
 `(make-rectangular x1 x2)` R5RS procedure
`(make-polar x3 x)`
`(real-part z)`
`(imag-part z)`
`(magnitude z)`
`(angle z)`

If x1, x2, x3, and x4 are real numbers and z is a complex number such that @@ -621,7 +626,7 @@ for some integer n.

Note: `Magnitude` is the same as `abs` for a real argument.

-
+
 `(exact->inexact z)` R5RS procedure
`(inexact->exact z)`

`Exact->inexact` returns an inexact representation of z. @@ -631,7 +636,7 @@ the argument. The value returned is the exact number that is numerically closest to the argument.

-
+
 `(number->string z)` R5RS procedure
`(number->string z radix)`

`Radix` must be an exact integer, either 2, 8, 10, or 16. If omitted, radix @@ -665,7 +670,7 @@ the radix is 10, then the above expression is normally satisfied by a result containing a decimal point. The unspecified case allows for infinities, NaNs, and non-flonum representations.

-
+
 `(string->number string)` R5RS procedure
`(string->number string radix)`

Returns a number of the maximally precise representation expressed by the @@ -687,7 +692,7 @@ for a number, then `string->number` returns `#f`.

-
+
 `(bit-and n1 n2 ...)` STklos procedure
`(bit-or n1 n2 ...)`
`(bit-xor n1 n2 ...)`
`(bit-not n)`
`(bit-shift n m)`

These procedures allow the manipulation of integers as bit fields. @@ -710,7 +715,7 @@ is shifted left by `m` bits; If `m` is negative, `n`

-
+
 `(random-integer n)` STklos procedure

Return an integer in the range [0, ..., `n`[. Subsequent results of @@ -720,7 +725,7 @@ otherwise an error is signaled. This function is equivalent to the eponym function of SRFI-27 (see SRFI-27 (Source of random bits) definition for more details).

-
+
 `(random-real)` STklos procedure

Return a real number `r` such that `0 < r < 1`. @@ -729,7 +734,7 @@ distributed. This function is equivalent to the eponym function of SRFI-27 (see SRFI-27 (Source of random bits) definition for more details).

-
+
 `(decode-float n)` STklos procedure

`decode-float` returns three exact integers: `significand`, `exponent` @@ -758,43 +763,43 @@ are generally faster than operations which accept general numbers. Fixnums operations, as described below, may produce results which are incorrect if some temporary computation falls outside the range of fixnum. These functions should be used only when speed really matters.

-
+
 `(fixnum? obj)` STklos procedure

Returns `#t` if obj is an exact integer within the fixnum range, `#f` otherwise.

-
+
 `(fixnum-width)` STklos procedure

Returns the number of bits used to represent a fixnum number

-
+
 `(least-fixnum)` STklos procedure
`(greatest-fixnum)`

These procedures return the minimum value and the maximum value of the fixnum range.

-
+
 `(fx+ fx1 fx2)` STklos procedure
`(fx- fx1 fx2)`
`(fx* fx1 fx2)`
`(fxdiv fx1 fx2)`
`(fxrem fx1 fx2)`
`(fxmod fx1 fx2)`
`(fx- fx)`

These procedures compute (respectively) the sum, the difference, the product, the quotient and the remainder and modulp of the fixnums `fx1` and `fx2`. The call of `fx-` with one parameter `fx` computes the opposite of `fx`.

-
+
 `(fx< fx1 fx2)` STklos procedure
`(fx<= fx1 fx2)`
`(fx> fx1 fx2)`
`(fx>= fx1 fx2)`
`(fx= fx1 fx2)`

These procedures compare the fixnums `fx1` and `fx2` and retun `#t` if the comparison is true and `#f` otherwise.

### 4.3 Booleans

-

Of all the standard Scheme values, only `#f` counts as false in +

Of all the standard Scheme values, only `#f` counts as false in conditional expressions. Except for `#f`, all standard Scheme values, including `#t`, pairs, the empty list, symbols, numbers, strings, vectors, and procedures, count as true.

Boolean constants evaluate to themselves, so they do not need to be quoted in programs.

-
+
 `(not obj)` R5RS procedure

Not returns `#t` if `obj` is false, and returns `#f` otherwise. @@ -811,7 +816,7 @@ quoted in programs.

-
+
 `(boolean? obj)` R5RS procedure

`Boolean?` returns `#t` if `obj` is either `#t` or `#f` and returns @@ -824,20 +829,20 @@ quoted in programs.

-
+
 `(boolean=? boolean1 boolean2 ...)` R5RS procedure

Returns #t if all the arguments are booleans and all are #t or all are #f.

### 4.4 Pairs and lists

-
-
+
+
 `(pair? obj)` R5RS procedure

`Pair?` returns `#t` if `obj` is a pair, and otherwise returns `#f`.

-
+
 `(cons obj1 obj2)` R5RS procedure

Returns a newly allocated pair whose car is obj1 and whose cdr is obj2. @@ -853,7 +858,7 @@ existing object.

-
+
 `(car pair)` R5RS procedure

Returns the contents of the car field of pair. @@ -867,7 +872,7 @@ Note that it is an error to take the `car` of the empty list.

-
+
 `(cdr pair)` R5RS procedure

Returns the contents of the cdr field of pair. @@ -880,7 +885,7 @@ Note that it is an error to take the `cdr` of the empty list.

-
+
 `(set-car! pair obj)` R5RS procedure

Stores `obj` in the car field of `pair`. @@ -894,14 +899,14 @@ The value returned by `set-car!` is void.

-
+
 `(set-cdr! pair obj)` R5RS procedure

Stores `obj` in the cdr field of `pair`. The value returned by `set-cdr!` is void.

-
+
 `(caar pair)` R5RS procedure
`(cadr pair)`
`...`
`(cdddar pair)`
`(cddddr pair)`

These procedures are compositions of `car` and `cdr`, where for example @@ -914,12 +919,12 @@ The value returned by `set-cdr!` is void. Arbitrary compositions, up to four deep, are provided. There are twenty-eight of these procedures in all.

-
+
 `(null? obj)` R5RS procedure

Returns `#t` if `obj` is the empty list, otherwise returns `#f`.

-
+
 `(pair-mutable? obj)` STklos procedure

Returns `#t` if `obj` is a mutable pair, otherwise returns `#f`. @@ -931,7 +936,7 @@ There are twenty-eight of these procedures in all.

-
+
 `(list? obj)` R5RS procedure

Returns `#t` if `obj` is a list, otherwise returns `#f`. By definition, @@ -947,14 +952,14 @@ all lists have finite length and are terminated by the empty list.

-
+
 `(make-list k)` R7RS procedure
`(make-list k fill)`

Returns a newly allocated list of k elements. If a second argument is given, then each element is initialized to fill . Otherwise the initial contents of each element is unspecified.

-
+
 `(list obj ...)` R5RS procedure

Returns a newly allocated list of its arguments. @@ -965,7 +970,7 @@ Otherwise the initial contents of each element is unspecified.

-
+
 `(list* obj ...)` STklos procedure

`list*` is like `list` except that the last argument to `list*` is @@ -978,7 +983,7 @@ used as the cdr of the last pair constructed.

-
+
 `(length list)` R5RS procedure

Returns the length of `list`. @@ -991,7 +996,7 @@ used as the cdr of the last pair constructed.

-
+
 `(append list ...)` R5RS procedure

Returns a list consisting of the elements of the first list @@ -1017,7 +1022,7 @@ proper list.

-
+
 `(append! list ...)` STklos procedure

Returns a list consisting of the elements of the first list @@ -1036,7 +1041,7 @@ list in the `append!` formal parameter list. An error is signaled if one of the given lists is a constant list.

-
+
 `(reverse list)` R5RS procedure

Returns a newly allocated list consisting of the elements of `list` in @@ -1049,7 +1054,7 @@ reverse order.

-
+
 `(reverse! list)` STklos procedure

Returns a list consisting of the elements of `list` in reverse order. @@ -1064,7 +1069,7 @@ computed "in place".

-
+
 `(list-tail list k)` R5RS procedure

Returns the sublist of `list` obtained by omitting the first `k` elements. @@ -1080,7 +1085,7 @@ be defined by

-
+
 `(last-pair list)` STklos procedure

Returns the last pair of `list`. @@ -1091,7 +1096,7 @@ be defined by

-
+
 `(list-ref list k)` R5RS procedure

Returns the `k`th element of `list`. (This is the same as the car @@ -1106,7 +1111,7 @@ elements.

-
+
 `(list-set! list k obj)` R7RS procedure

The `list-set!` procedure stores `obj` in element `k` of `list`. @@ -1120,7 +1125,7 @@ It is an error if `k` is not a valid index of `list`.

-
+
 `(memq obj list)` R5RS/R7RS procedure
`(memv obj list)`
`(member obj list)`
`(member obj list compare)`

These procedures return the first sublist of list whose car is `obj`, @@ -1149,7 +1154,7 @@ while `memv` uses `eqv?` and `member` uses Note: As in R7RS, the `member` function accepts also a comparison function.

-
+
 `(assq obj alist)` R5RS/R7RS procedure
`(assv obj alist)`
`(assoc obj alist)`
`(assoc obj alist compare)`

`Alist` (for "association list") must be a list of pairs. These procedures @@ -1183,7 +1188,7 @@ marks in their names because they return useful values rather than just Note: As in R7RS, the `assoc` function accepts also a comparison function.

-
+
 `(list-copy obj)` R7RS procedure

`list-copy` recursively copies trees of pairs. If `obj` is @@ -1191,7 +1196,7 @@ not a pair, it is returned; otherwise the result is a new pair whose `car` and `cdr` are obtained by calling `list-copy` on the `car` and `cdr` of `obj`, respectively.

-
+
 `(filter pred list)` STklos procedure
`(filter! pred list)`

`Filter` returns all the elements of `list` that satisfy predicate @@ -1209,7 +1214,7 @@ modifying its `list` argument An error is signaled if `list` is a constant list.

-
+
 `(remove pred list)` STklos procedure

`Remove` returns `list` without the elements that satisfy predicate `pred`: @@ -1223,7 +1228,7 @@ same job than `remove` by physically modifying its `list`

-
+
 `(delete x list [=])` STklos procedure
`(delete! x list [=])`

`Delete` uses the comparison procedure `=`, which defaults to @@ -1273,7 +1278,7 @@ the identifier λ.

-
+
 `(symbol? obj)` R5RS procedure

Returns `#t` if obj is a symbol, otherwise returns `#f`. @@ -1289,13 +1294,13 @@ the identifier λ.

-
+
 `(symbol=? symbol1 symbol2 ...)` R5RS procedure

Returns #t if all the arguments are symbols and all have the same name in the sense of `string=?`.

-
+
 `(symbol->string string)` R5RS procedure

Returns the name of `symbol` as a string. If the symbol was part of an @@ -1316,7 +1321,7 @@ returned by this procedure.

-
+
 `(string->symbol string)` R5RS procedure

Returns the symbol whose name is `string`. This procedure can create @@ -1340,7 +1345,7 @@ because in some implementations of Scheme they cannot be read as themselves.

-
+
 `(string->unterned-symbol string)` STklos procedure

Returns the symbol whose print name is made from the characters of @@ -1357,7 +1362,7 @@ because in some implementations of Scheme they cannot be read as themselves.

-
+
 `(gensym)` STklos procedure
`(gensym prefix)`

Creates a new symbol. The print name of the generated symbol @@ -1373,7 +1378,7 @@ either a string or a symbol.

### 4.6 Characters

-

The following table gives the list of allowed character names with their +

The following table gives the list of allowed character names with their ASCII eqivalent expressed in octal. Some chracaters have an alternate name which is also shown in this table.

@@ -1404,12 +1409,12 @@ which is also shown in this table.

namevaluealt. namenamevaluealt. name
-
+
 `(char? obj)` R5RS procedure

Returns `#t` if `obj` is a character, otherwise returns `#f`.

-
+
 `(char=? char1 char2)` R5RS procedure
`(char<? char1 char2)`
`(char>? char1 char2)`
`(char<=? char1 char2)`
`(char>=? char1 char2)`

These procedures impose a total ordering on the set of characters. @@ -1421,14 +1426,14 @@ It is guaranteed that under this ordering:
• Either all the digits precede all the lower case letters, or vice versa.

• -
+
 `(char-ci=? char1 char2)` R5RS procedure
`(char-ci<? char1 char2)`
`(char-ci>? char1 char2)`
`(char-ci<=? char1 char2)`
`(char-ci>=? char1 char2)`

These procedures are similar to `char=?` et cetera, but they treat upper case and lower case letters as the same. For example, `(char-ci=? #A #a)` returns `#t`.

-
+
 `(char-alphabetic? char)` R5RS procedure
`(char-numeric? char)`
`(char-whitespace? char)`
`(char-upper-case? letter)`
`(char-lower-case? letter)`

These procedures return `#t` if their arguments are alphabetic, numeric, @@ -1439,7 +1444,7 @@ upper and lower case letters. The numeric characters are the ten decimal digits. The whitespace characters are space, tab, line feed, form feed, and carriage return.

-
+
 `(char->integer char)` R5RS procedure
`(integer->char n)`

Given a character, `char->integer` returns an exact integer @@ -1468,7 +1473,7 @@ and x and y are in the domain of `integer->char`, then #xE000 and #x10FFFF, if UTF8 encoding is used. Otherwise it accepts a number between0 and #xFF.

-
+ result of `char-upcase` is upper case and the result of `char-downcase` is lower case.
 `(char-upcase char)` R5RS procedure
`(char-downcase char)`

These procedures return a character `char2` such that @@ -1476,7 +1481,7 @@ number between0 and #xFF.

-
+
 `(char-foldcase char)` STklos procedure

This procedure applies the Unicode simple case folding algorithm and returns @@ -1486,7 +1491,7 @@ lowercase letter or the same as the argument if the lowercase letter does not exist.

### 4.7 Strings

-

STklos string constants allow the insertion of arbitrary characters +

STklos string constants allow the insertion of arbitrary characters by encoding them as escape sequences. An escape sequence is introduced by a backslash "\". The valid escape sequences are shown in the following table.

@@ -1520,35 +1525,35 @@ expands to nothing (along with any trailing <intraline whitespace>), and can be used to indent strings for improved legibility.

-
+
 `(string? obj)` R5RS procedure

Returns `#t` if `obj` is a string, otherwise returns `#f`.

-
+
 `(make-string k)` R5RS procedure
`(make-string k char)`

`Make-string` returns a newly allocated string of length `k`. If `char` is given, then all elements of the string are initialized to `char`, otherwise the contents of the string are unspecified.

-
+
 `(string char ...)` R5RS procedure

Returns a newly allocated string composed of the arguments.

-
+
 `(string-length string)` R5RS procedure

Returns the number of characters in the given `string`.

-
+
 `(string-ref string k)` R5RS procedure

`String-ref` returns character k of string using zero-origin indexing (`k` must be a valid index of string).

-
+
 `(string-set! string k char)` R5RS procedure

`String-set!` stores `char` in element `k` of `string` and returns @@ -1565,7 +1570,7 @@ the contents of the string are unspecified.

-
+
 `(string=? string1 string2 ...)` R5RS/R7RS procedure
`(string-ci=? string1 string2 ...)`

Returns `#t` if all the strings are the same length and contain the same @@ -1575,7 +1580,7 @@ but `string=?` treats upper and lower case as distinct characters.

Note: R5RS version of these functions accept only two arguments.

-
+
 `(string
`(string>? string1 string2 ...)`
`(string<=? string1 string2 ...)`
`(string>=? string1 string2 ...)`
`(string-ci<? string1 string2 ...)`
`(string-ci>? string1 string2 ...)`
`(string-ci<=? string1 string2 ...)`
`(string-ci>=? string1 string2)`

These procedures are the lexicographic extensions to strings of the @@ -1587,7 +1592,7 @@ lexicographically less than the longer string.

Note: R5RS version of these functions accept only two arguments.

-
+
 `(substring string start end)` R5RS procedure

`String` must be a string, and `start` and `end` must be exact integers @@ -1601,13 +1606,13 @@ satisfying of `string` beginning with index `start` (inclusive) and ending with index `end` (exclusive).

-
+
 `(string-append string ...)` R5RS procedure

Returns a newly allocated string whose characters form the concatenation of the given strings.

-
+
 `(string->list string)` R5RS/R7RS procedure
`(string->list string start)`
`(string->list string start end)`
`(list->string list)`

`String->list` returns a newly allocated list of the characters of @@ -1620,7 +1625,7 @@ which must be a list of characters. `String->list` and Note: The R5RS version of `string->list` accepts only one parameter.

-
+
 `(string-copy string)` R5RS/R7RS procedure
`(string-copy string start)`
`(string-copy string start stop)`

Returns a newly allocated copy of the part of the given `string` @@ -1628,7 +1633,7 @@ between `start` and `stop`.

Note: The R5RS version of `string-copy` accepts only one argument.

-
+
 `(string-copy! to at from)` R7RS procedure
`(string-copy! to at from start)`
`(string-copy! to at from start end)`

Copies the characters of `string` from between `start` and `end` @@ -1643,7 +1648,7 @@ It is an error if `at` is less than zero or greater than the length of `to`. It is also an error if `(- (string-length to) at)` is less than `(- end start)`.

-
+
 `(string-split str)` STklos procedure
`(string-split str delimiters)`

parses `string` and returns a list of tokens ended by a character of the @@ -1658,7 +1663,7 @@ containing a space, a tabulation and a newline characters.

-
+
 `(string-index str1 str2)` STklos procedure

Returns the (first) index where `str1` is a substring of `str2` if it exists; @@ -1670,19 +1675,19 @@ otherwise returns `#f`.

-
+
 `(string-find? str1 str2)` STklos procedure

Returns `#t` if `str1` appears somewhere in `str2`; otherwise returns `#f`.

-
+
 `(string-fill! string char)` R7RS procedure
`(string-fill! string char start)`
`(string-fill! string char start end)`

Stores `char` in every element of the given `string` between `start` and `end`.

Note: The R5RS version of `string-fill!` accepts only one argument.

-
+
 `(string-blit! s1 s2 offset)` STklos procedure

This function places the characters of string `s2` in the string `s1` @@ -1700,7 +1705,7 @@ the end of `s1` (in which case a new string is allocated).

- -
+
 `(string-mutable? obj)` STklos procedure

Returns `#t` if `obj` is a mutable string, otherwise returns `#f`. @@ -1712,7 +1717,7 @@ the end of `s1` (in which case a new string is allocated).

The following string primitives are compatible with SRFI-13 +

The following string primitives are compatible with SRFI-13 (String Library) and their documentation comes from the SRFI document.

Notes:

• The string SRFI is supported by STklos. The @@ -1721,7 +1726,7 @@ and their documentation comes from the SRFI document.

Notes:The functions `string-upcase`, `string-downcase` and `string-foldcase` are also defined in R7RS.

-
+
 `(string-downcase str)` R7RS procedure
`(string-downcase str start)`
`(string-downcase str start end)`

Returns a string in which the upper case letters of string `str` between the @@ -1738,7 +1743,7 @@ the length of `str`. Note: In R7RS, `string-downcase` accepts only one argument.

-
+
 `(string-downcase! str)` STklos procedure
`(string-downcase! str start)`
`(string-downcase! str start end)`

This is the in-place side-effecting variant of `string-downcase`. @@ -1749,7 +1754,7 @@ the length of `str`.

-
+
 `(string-upcase str)` R7RS procedure
`(string-upcase str start)`
`(string-upcase str start end)`

Returns a string in which the lower case letters of string `str` between the @@ -1759,12 +1764,12 @@ the length of `str`.

Note: In R7RS, `string-upcase` accepts only one argument.

-
+
 `(string-upcase! str)` STklos procedure
`(string-upcase! str start)`
`(string-upcase! str start end)`

This is the in-place side-effecting variant of `string-upcase`.

-
+
 `(string-titlecase str)` STklos procedure
`(string-titlecase str start)`
`(string-titlecase str start end)`

This function returns a string. For every character `c` in the @@ -1786,13 +1791,13 @@ Note that if a `start` index is specified, then the character precedi

-
+
 `(string-titlecase! str)` STklos procedure
`(string-titlecase! str start)`
`(string-titlecase! str start end)`

This is the in-place side-effecting variant of `string-titlecase`.

The functions string-foldcase and string-foldcase! described below are inspired from R6RS.

-
+
 `(string-foldcase str)` R7RS procedure
`(string-foldcase str start)`
`(string-foldcase str start end)`

Returns a string in which the Unicode simple case-folding algorithm has @@ -1802,13 +1807,13 @@ the length of `str`.

Note: In R7RS, `string-foldcase` accepts only one argument.

-
+
 `(string-foldcase! str)` STklos procedure
`(string-foldcase! str start)`
`(string-foldcase! str start end)`

This is the in-place side-effecting variant of `string-foldcase`.

### 4.8 Vectors

-

Vectors are heterogenous structures whose elements are +

Vectors are heterogenous structures whose elements are indexed by integers. A vector typically occupies less space than a list of the same length, and the average time required to access a randomly chosen element is typically less for the vector @@ -1827,19 +1832,19 @@ following:

Note: In STklos, vectors constants don't need to be quoted.

-
+
 `(vector? obj)` R5RS procedure

Returns `#t` if `obj` is a vector, otherwise returns `#f`.

-
+
 `(make-vector k)` R5RS procedure
`(make-vector k fill)`

Returns a newly allocated vector of `k` elements. If a second argument is given, then each element is initialized to `fill`. Otherwise the initial contents of each element is unspecified.

-
+
 `(vector obj ...)` R5RS procedure

Returns a newly allocated vector whose elements contain the given arguments. @@ -1851,12 +1856,12 @@ Analogous to `list`.

-
+
 `(vector-length vector)` R5RS procedure

Returns the number of elements in `vector` as an exact integer.

-
+
 `(vector-ref vector k)` R5RS procedure

`k` must be a valid index of `vector`. `Vector-ref` returns the contents of @@ -1873,7 +1878,7 @@ element `k` of vector.

-
+
 `(vector-set! vector k obj)` R5RS procedure

`k` must be a valid index of `vector`. `Vector-set!` stores `obj` in element @@ -1889,7 +1894,7 @@ element `k` of vector.

-
+
 `(vector->list vector)` R5RS/R7RS procedure
`(vector->list vector start)`
`(vector->list vector start end)`
`(list->vector list)`

`Vector->list` returns a newly allocated list of the objects contained in @@ -1909,7 +1914,7 @@ In both procedures, order is preserved. Note: The R5RS version of `vector->list` accepts only one parameter.

-
+
 `(vector->string string)` R7RS procedure
`(vector->string string start)`
`(vector->string string start end)`
`(string->vector vector)`
`(string->vector vector start)`
`(string->vector vector start end)`

The `vector->string` procedure returns a newly allocated @@ -1929,7 +1934,7 @@ In both procedures, order is preserved.

-
+
 `(vector-append vector ...)` R5RS procedure

Returns a newly allocated vector whose elements are the @@ -1941,7 +1946,7 @@ concatenation of the elements of the given vectors.

-
+
 `(vector-fill! vector fill)` R5RS/R7RS procedure
`(vector-fill! vector fill start)`
`(vector-fill! vector fill start end)`

Stores `fill` in every element of `vector` between `start` and `end`. @@ -1949,7 +1954,7 @@ concatenation of the elements of the given vectors. Note: The R5RS version of `vector-fill!` accepts only one parameter.

-
+
 `(vector-copy v)` R5RS/R7RS procedure
`(vector-copy string start)`
`(vector-copy string start stop)`

Return a newly allocated copy of the elements of the given @@ -1970,12 +1975,12 @@ c ⇒ #(8 2)

-
+
 `(vector-copy! to at from)` R7RS procedure
`(vector-copy! to at from start)`
`(vector-copy! to at from start end)`

-
+
 `(vector-resize v size)` STklos procedure
`(vector-resize v size fill)`

Returns a copy of v of the given `size`. If `size` is greater @@ -1983,7 +1988,7 @@ than the vector size of `v`, the contents of the newly allocated vect is set to the value of `fill`. If `fill` is omitted the content of the new cells is void.

-
+
 `(vector-mutable? obj)` STklos procedure

Returns `#t` if `obj` is a mutable vector, otherwise returns `#f`. @@ -1996,7 +2001,7 @@ new cells is void.

-
+
 `(sort obj predicate)` STklos procedure

`Obj` must be a list or a vector. `Sort` returns a copy of `obj` sorted @@ -2015,12 +2020,12 @@ two arguments and returns a true value if the first argument is strictly

### 4.9 Structures

-

A structure type is a record data type composing a number of slots. A +

A structure type is a record data type composing a number of slots. A structure, an instance of a structure type, is a first-class value that contains a value for each field of the structure type.

Structures can be created with the `define-struct` high level syntax. However, STklos also offers some low-level functions to build and access the internals of a structure.

-
+
 `(define-struct ...)` STklos syntax

Defines a structure type whose name is `<name>`. Once a structure type is @@ -2050,7 +2055,7 @@ content of a slot can be done using a generalized `set!`.

-
+
 `(make-struct-type name parent slots)` STklos procedure

This form which is more general than `define-struct` permits to define a @@ -2062,7 +2067,7 @@ names which constitute the structure tpe. When a structure type is s subtype of a previous type, its slots are added to the ones of the super type.

-
+
 `(struct-type? obj)` STklos procedure

Returns `#t` if `obj` is a structure type, otherwise returns `#f`. @@ -2073,7 +2078,7 @@ to the ones of the super type.

-
+
 `(struct-type-slots structype)` STklos procedure

Returns the slots of the structure type `structype` as a list. @@ -2086,18 +2091,18 @@ to the ones of the super type.

-
+
 `(struct-type-parent structype)` STklos procedure

Returns the super type of the structure type `structype`, if it exists or `#f` otherwise.

-
+
 `(struct-type-name structype)` STklos procedure

Returns the name associated to the structure type `structype`.

-
+
 `(struct-type-change-writer! structype proc)` STklos procedure

Change the default writer associated to structures of type `structype` to @@ -2125,7 +2130,7 @@ writer for `structype`, use the special value `#f`.

-
+
 `(make-struct structype expr ...)` STklos procedure

Returns a newly allocated instance of the structure type `structype`, @@ -2133,7 +2138,7 @@ whose slots are initialized to `expr` ... If fewer `expr` instances are given to `make-struct`, the remaining slots are inialized with the special void value.

-
+
 `(struct? obj)` STklos procedure

Returns `#t` if `obj` is a structure, otherwise returns `#f`. @@ -2145,12 +2150,12 @@ the special void value.

-
+
 `(struct-type s)` STklos procedure

Returns the structure type of the `s` structure

-
+
 `(struct-ref s slot-name)` STklos procedure

Returns the value associated to slot `slot-name` of the `s` structure. @@ -2165,7 +2170,7 @@ the special void value.

-
+
 `(struct-set! s slot-name value)` STklos procedure

Stores value in the to slot `slot-name` of the `s` structure. The value @@ -2181,7 +2186,7 @@ returned by `struct-set!` is void.

-
+
 `(struct-is-a? s structype)` STklos procedure

Return a boolean that indicates if the structure `s` is a of type `structype`. @@ -2201,7 +2206,7 @@ also as an instance of type S.

-
+
 `(struct->list s)` STklos procedure

Returns the content of structure `s` as an A-list whose keys are the @@ -2215,7 +2220,7 @@ slots of the structure type of `s`.

### 4.10 Bytevectors

-

Bytevectors represent blocks of binary data. They +

Bytevectors represent blocks of binary data. They are fixed-length sequences of bytes, where a byte is an exact integer in the range `(0, 255). A bytevector is typically more space-efficient than a vector containing the same values.

The length of a bytevector is the number of elements @@ -2227,12 +2232,12 @@ For example, a bytevector of length 3 containing the byte 0 in element 0, the byte 10 in element 1, and the byte 5 in element 2 can be written as follows: `#u8(0 10 5)`

Bytevector constants are self-evaluating, so they do not need to be quoted in programs.

-
+
 `(bytevector? obj)` R7RS procedure

Returns `!t` if `obj` is a bytevector and returns `!f` otherwise.

-
+
 `(make-bytevector k)` R7RS procedure
`(make-bytevector k byte)`

Returns a newly allocated bytevector of k bytes. If If `byte` is given, @@ -2245,7 +2250,7 @@ the contents of each element is 0.

-
+
 `(bytevector byte ...)` R7RS procedure

Returns a newly allocated bytevector containing its arguments. @@ -2256,12 +2261,12 @@ the contents of each element is 0.

-
+
 `(bytevector-length bytevector)` R7RS procedure

Returns the length of `bytevector` in bytes as an exact integer.

-
+
 `(bytevector-u8-ref bytevector k)` R7RS procedure

Returns the byte at index `k` of `bytevector` as an exact integer in the @@ -2273,7 +2278,7 @@ range `(0..255). It is an error if `k` is not a valid index of ``` ```

-
+
 `(bytevector-u8-ref bytevector k byte)` STklos procedure

Stores byte as the k th byte of bytevector. It is an error if `k` @@ -2287,7 +2292,7 @@ is not a valid index of `bytevector`.

-
+
 `(bytevector-copy bytevector)` R7RS procedure
`(bytevector-copy bytevector start)`
`(bytevector-copy bytevector start end)`

Returns a newly allocated bytevector containing the bytes in `bytevector` @@ -2299,7 +2304,7 @@ between `start` and `end`.

-
+
 `(bytevector-copy! to at from)` R7RS procedure
`(bytevector-copy! to at from start)`
`(bytevector-copy! to at from start end)`

Copies the bytes of bytevector `from` between `start` and `end` @@ -2323,7 +2328,7 @@ b ⇒ #u8(10 1 2 40 50

-
+
 `(bytevector-append bytevector ...)` R5RS procedure

Returns a newly allocated bytevector whose elements are @@ -2335,7 +2340,7 @@ the concatenation of the elements in the given bytevectors.

-
+
 `(utf8->string bytevector)` R7RS procedure
`(utf8->string bytevector start)`
`(utf8->string bytevector start end)`
`(string->utf8 string)`
`(string->utf8 string start)`
`(string->utf8 string start end)`

These procedures translate between strings and bytevectors @@ -2357,7 +2362,7 @@ sequences.

### 4.11 Control features

-
+
 `(procedure? obj)` R5RS procedure

Returns `#t` if `obj` is a procedure, otherwise returns `#f`. @@ -2372,7 +2377,7 @@ sequences.

-
+
 `(apply proc arg1 ... args)` R5RS procedure

`Proc` must be a procedure and `args` must be a list. Calls `proc` with the @@ -2396,7 +2401,7 @@ as the actual arguments.

-
+
 `(map proc list1 list2 ...)` R5RS procedure

The `list`s must be lists, and `proc` must be a procedure taking as many @@ -2422,7 +2427,7 @@ to the elements of the lists is unspecified.

-
+
 `(string-map proc string1 string2 ...)` R7RS procedure

The `strings` must be strings, and `proc` must be a procedure taking as @@ -2455,7 +2460,7 @@ unspecified.

-
+
 `(vector-map proc vector1 vector2 ...)` R7RS procedure

The `vectors` must be vectors, and `proc` must be a procedure @@ -2488,7 +2493,7 @@ unspecified.

-
+
 `(for-each proc list1 list2 ...)` R5RS procedure

The arguments to `for-each` are like the arguments to `map`, but `for-each` @@ -2506,7 +2511,7 @@ returned by `for-each` is void.

-
+
 `(string-for-each proc string1 string2 ...)` R7RS procedure

The arguments to `string-for-each` are like the arguments to @@ -2527,7 +2532,7 @@ the shortest string runs out.

-
+
 `(vector-for-each proc vector1 vector2 ...)` R7RS procedure

The arguments to `vector-for-each` are like the arguments to @@ -2548,7 +2553,7 @@ the shortest vector runs out.

-
+
 `(every pred list1 list2 ...)` STklos procedure

`every` applies the predicate `pred` across the lists, returning true if @@ -2572,7 +2577,7 @@ Like `any`, every's name does not end with a question mark -- this is indicate that it does not return a simple boolean (`#t` or `#f`), but a general value.

-
+
 `(any pred list1 list2 ...)` STklos procedure

`any` applies the predicate across the lists, returning true if the @@ -2602,7 +2607,7 @@ a general value.

-
+
 `(force promise)` R5RS procedure

Forces the value of `promise` (see delay). If no value has been @@ -2651,7 +2656,7 @@ p ⇒ a promise, still Note: See R5RS for details on a posssible way to implement `force` and `delay`.

-
+
 `(call-with-current-continuation proc)` R5RS procedure
`(call/cc proc)`

`Proc` must be a procedure of one argument. The procedure @@ -2730,7 +2735,7 @@ like the current continuation. Note: `call/cc` is just another name for `call-with-current-continuation`.

-
+ -
 `(call/ec proc)` STklos procedure

`call/ec` is an short name for `call-with-escape-continuation`. `call/ec` @@ -2747,8 +2752,8 @@ cannot be "re-enterered". `call/ec` is cheaper than the full call/cc. It is particularily useful when all the power of `call/cc` is not needded.

-
+

+
 `(values obj ...)` R5RS procedure

Delivers all of its arguments to its continuation. @@ -2758,7 +2763,7 @@ of a `call-with-values`. In ST ignored).

-
+
 `(call-with-values producer consumer)` R5RS procedure

Calls its producer argument with no values and a continuation that, @@ -2774,7 +2779,7 @@ continuation of the call to call-with-values.

-
+
 `(receive )` STklos syntax

This form is defined in SRFI-8 @@ -2823,7 +2828,7 @@ are the values of the receive-expression.

-
+
 `(dynamic-wind before thunk after)` R5RS procedure

Current version of `dynamic-wind` mimics the R5RS one. In particular, it @@ -2892,7 +2897,7 @@ dynamic extent of a call to `before` or `after` is undefin

-
+ -
 `(eval expression environment)` R5RS procedure
`(eval expression)`

Evaluates expression in the specified environment and returns its @@ -2915,7 +2920,7 @@ as data. `Environment` may be a
+
 `(scheme-report-environment)` R5RS procedure
`(scheme-report-environment version)`

Returns a specifier for an environment that contains the bindings defined @@ -2924,7 +2929,7 @@ in the R5RS report. Note: In STklos, `scheme-report-environment` function can be called without the version number (defaults to 5).

-
+
 `(null-environment)` R5RS procedure
`(null-environment version)`

Returns a specifier for an environment that is empty except for @@ -2934,13 +2939,13 @@ the R5RS report. Note: In STklos, `null-environment` function can be called without the version number (defaults to 5).

-
+
 `(interaction-environment)` R5RS procedure

This procedure returns the environment in the expression are evaluated by default (the STklos module).

-
+
 `(eval-from-string str)` STklos procedure
`(eval-from-string str module)`

Read an expression from `str` and evaluates it with `eval`. If a `module` @@ -2958,7 +2963,7 @@ Otherwise, the evaluation takes place in the environment returned by

### 4.12 Input and Output

-

R5RS states that ports represent input and output +

R5RS states that ports represent input and output devices. However, it defines only ports which are attached to files. In STklos, ports can also be attached to strings, to a external command input or output, or even be virtual (i.e. the @@ -2978,7 +2983,7 @@ be accessed as a normal port with the standard Scheme primitives.

#### 4.12.1 Ports

-
+
 `(call-with-port port proc)` R7RS procedure

The `call-with-port` procedure calls `proc` with `port` as an @@ -3011,7 +3016,7 @@ c R7RS input-port-open? Returns #t if port is still open and capable of performing input or output, respectively, and #f otherwise.

-
+
 `(call-with-input-file string proc)` R5RS procedure
`(call-with-output-file string proc)`

`String` should be a string naming a file, and `proc` should be a procedure @@ -3029,7 +3034,7 @@ from the current continuation, then it would be impossible to write portable code using both `call-with-current-continuation` and `call-with-input-file` or `call-with-output-file`.

-
+
 `(call-with-input-string string proc)` STklos procedure

behaves as `call-with-input-file` except that the port passed to `proc` @@ -3044,7 +3049,7 @@ is the sting port obtained from `port`.

-
+
 `(call-with-output-string proc)` STklos procedure

`Proc` should be a procedure of one argument. `Call-with-output-string` @@ -3058,64 +3063,64 @@ on the string port.

-
+
 `(input-port? obj)` R5RS procedure
`(output-port? obj)`

Returns `#t` if `obj` is an input port or output port respectively, otherwise returns #f.

-
+
 `(textual-port? obj)` R7RS procedure
`(binary-port? obj)`

Returns `#t` if `obj` is an textual port or binary port respectively, otherwise returns #f.

-
+
 `(port? obj)` R7RS procedure

Returns `#t` if `obj` is an input port or an output port, otherwise returns #f.

-
+
 `(input-string-port? obj)` STklos procedure
`(output-string-port? obj)`

Returns `#t` if `obj` is an input string port or output string port respectively, otherwise returns #f.

-
+
 `(input-bytevector-port? obj)` STklos procedure
`(output-bytevector-port? obj)`

Returns `#t` if `obj` is an input bytevector port or output bytevector port respectively, otherwise returns #f.

-
+
 `(input-file-port? obj)` STklos procedure
`(output-file-port? obj)`

Returns `#t` if `obj` is a file input port or a file output port respectively, otherwise returns #f.

-
+
 `(input-virtual-port? obj)` STklos procedure
`(output-virtual-port? obj)`

Returns `#t` if `obj` is a virtual input port or a virtual output port respectively, otherwise returns #f.

-
+
 `(interactive-port? port)` STklos procedure

Returns `#t` if `port` is connected to a terminal and `#f` otherwise.

-
+
 `(current-input-port obj)` R5RS procedure
`(current-output-port obj)`

Returns the current default input or output port.

-
+
 `(current-error-port obj)` STklos procedure

Returns the current default error port.

-
+
 `(with-input-from-file string thunk)` R5RS procedure
`(with-output-to-file string thunk)`

`String` should be a string naming a file, and `proc` should be a @@ -3154,13 +3159,13 @@ it is the standard input of the Unix command which is redirected.

-
+
 `(with-error-to-file string thunk)` STklos procedure

This procedure is similar to with-output-to-file, excepted that it uses the current error port instead of the output port.

-
+
 `(with-input-from-string string thunk)` STklos procedure

A string port is opened for input from `string`. `Current-input-port` @@ -3174,7 +3179,7 @@ returns the value(s) computed by `thunk`.

-
+
 `(with-output-to-string thunk)` STklos procedure

A string port is opened for output. `Current-output-port` @@ -3188,7 +3193,7 @@ returns the string containing the text written on the string port.

-
+
 `(with-input-from-port port thunk)` STklos procedure
`(with-output-to-port port thunk)`
`(with-error-to-port port thunk)`

`Port` should be a port, and `proc` should be a @@ -3196,7 +3201,7 @@ procedure of no arguments. These procedures do a job similar to the `with-...-file` counterparts excepted that they use an open port instead of string specifying a file name

-
+ -
 `(open-input-file filename)` R5RS procedure

Takes a string naming an existing file and returns an input port capable @@ -3206,20 +3211,20 @@ an error is signalled. Note: if `filename` starts with the string `"| "`, this procedure returns a pipe port. Consequently, it is not possible to open a file whose name starts with those two characters.

-
+

+
 `(open-input-string str)` STklos procedure

Returns an input string port capable of delivering characters from `str`.

-
+
 `(open-input-string bytevector)` R7RS procedure

Takes a bytevector and returns a binary input port that delivers bytes from the `bytevector`.

-
+
 `(open-input-virtual :key (read-char #f) (ready? #f) (eof? #f) (close #f))` STklos procedure

Returns a virtual port using the `read-char` procedure to read a @@ -3253,7 +3258,7 @@ using virtual ports:

-
+ -
 `(open-output-file filename)` R5RS procedure

Takes a string naming an output file to be created and returns an output @@ -3264,19 +3269,19 @@ already exists, it is rewritten. Note: if `filename` starts with the string `"| "`, this procedure returns a pipe port. Consequently, it is not possible to open a file whose name starts with those two characters.

-
+

+
 `(open-output-string)` STklos procedure

Returns an output string port capable of receiving and collecting characters.

-
+
 `(open-output-bytevector)` R7RS procedure

Returns a binary output port that will accumulate bytes for retrieval by `get-output-bytevector`.

-
+
 `(open-output-virtual :key (write-char #f) (write-string #f) (flush #f) (close #f))` STklos procedure

Returns a virtual port using the `write-char` procedure to write a @@ -3326,7 +3331,7 @@ are converted to upper case:

-
+ -
 `(open-file filename mode)` STklos procedure

Opens the file whose name is `filename` with the specified string @@ -3349,8 +3354,8 @@ If the file can be opened, `open-file` returns the textual port assoc with the given file, otherwise it returns `#f`. Here again, the ``magic'' string "| " permits to open a pipe port (in this case mode can only be `"r"` or `"w"`).

-
+

+
 `(get-output-string port)` STklos procedure

Returns a string containing all the text that has been written on the @@ -3363,7 +3368,7 @@ output string `port`.

-
+
 `(get-output-bytevector port)` STklos procedure

Returns a bytevector consisting of the bytes that have been @@ -3378,25 +3383,25 @@ output to the `port` so far in the order they were output.

-
+
 `(close-input-port port)` R5RS procedure
`(close-output-port port)`

Closes the port associated with `port`, rendering the port incapable of delivering or accepting characters. These routines have no effect if the port has already been closed. The value returned is void.

-
+
 `(close-port port)` R7RS procedure

Closes the port associated with `port`.

-
+
 `(port-rewind port)` STklos procedure

Sets the port position to the beginning of `port`. The value returned by `port-rewind` is void.

-
+
 `(port-seek port pos)` STklos procedure
`(port-seek port pos whence)`

Sets the file position for the given `port` to the position `pos`. @@ -3410,7 +3415,7 @@ defaults to `:start`. Note: After using port-seek, the value returned by `port-current-line` may be incorrect.

-
+
 `(port-current-line)` STklos procedure
`(port-current-line port)`

Returns the current line number associated to the given input `port` as an @@ -3422,7 +3427,7 @@ generally break the line-number. After using one of theses procedures, the value returned by `port-current-line` will be `-1` (except a `port-seek` at the beginning of the port reinitializes the line counter).

-
+
 `(port-current-position)` STklos procedure
`(port-current-position port)`

Returns the position associated to the given `port` as an @@ -3430,12 +3435,12 @@ integer (i.e. number of characters from the beginning of the port). The `port` argument may be omitted, in which case it defaults to the value returned by `current-input-port`.

-
+
 `(port-file-name port)` STklos procedure

Returns the file name used to open `port`; `port` must be a file port.

-
+
 `(port-idle-register! port thunk)` STklos procedure
`(port-idle-unregister! port thunk)`
`(port-idle-reset! port)`

`port-idle-register!` allows to register `thunk` as an idle handler @@ -3459,7 +3464,7 @@ repeatedly until a sexpr is read on the current input port.

-
+
 `(port-closed? port)` STklos procedure
`(port-open? port)`

`port-closed` returns `#t` if `port` is closed and `#f` otherwise. @@ -3472,7 +3477,7 @@ of the R7RS functions <

#### 4.12.2 Input

-
+ -
 `(read)` R5RS procedure
`(read port)`

`Read` converts external representations of Scheme objects into the @@ -3494,8 +3499,8 @@ returned by `current-input-port`. It is an error to read from a close (Sharp Comma External Form) `#` form that can be used to denote values that do not have a convenient printed representation. See the SRFI document for more information.

-
+

+
 `(read-with-shared-structure)` STklos procedure
`(read-with-shared-structure port)`
`(read/ss)`
`(read/ss port)`

`read-with-shared-structure` is identical to `read`. It has been added to @@ -3504,8 +3509,8 @@ be compatible with
-
+

+
 `(define-reader-ctor tag proc)` STklos procedure

This procedure permits to define a new user to reader constructor procedure @@ -3520,7 +3525,7 @@ for more information.

-
+
 `(read-char)` R5RS procedure
`(read-char port)`

Returns the next character available from the input `port`, updating the `port` @@ -3528,7 +3533,7 @@ to point to the following character. If no more characters are available, an end of file object is returned. `Port` may be omitted, in which case it defaults to the value returned by `current-input-port`.

-
+
 `(read-bytes size)` STklos procedure
`(read-bytes size port)`

Returns a newly allocated string made of `size` characters read from `port`. @@ -3540,7 +3545,7 @@ value returned by `current-input-port`. Note: This function was previously called `read-chars`. Usage of the old name is deprecated.

-
+
 `(read-bytevector k)` R7RS procedure
`(read-bytevector k port)`

Reads the next `k` bytes, or as many as are available @@ -3549,7 +3554,7 @@ newly allocated string in left-to-right order and returns the string. If no characters are available before the end of file, an end-of-file object is returned.

-
+
 `(read-bytevector! k)` R7RS procedure
`(read-bytevector! k port)`
`(read-bytevector! k port start)`
`(read-bytevector! k port start end)`

Reads the next `end - start` bytes, or as many as are available @@ -3560,7 +3565,7 @@ position. If `end` is not supplied, reads until the end of beginning at position 0. Returns the number of bytes read. If no bytes are available, an end-of-file object is returned.

-
+
 `(read-bytes! str)` STklos procedure
`(read-bytes! str port)`

This function reads the characters available from `port` in the string `str` @@ -3593,14 +3598,14 @@ a new string for each read. Note: This function was previously called `read-chars!`. Usage of the old name is deprecated.

-
+
 `(read-byte)` STklos procedure
`(read-byte port)`

Returns the next character available from the input `port` as an integer. If the end of file is reached, this function returns the end of file object.

-
+
 `(peek-char)` R5RS procedure
`(peek-char port)`

Returns the next character available from the input `port`, without updating @@ -3616,26 +3621,26 @@ call to `peek-char`. In particular, a call to `peek-char` port will hang waiting for input whenever a call to `read-char` would have hung.

-
+
 `(peek-byte)` STklos procedure
`(peek-byte port)`

Returns the next character available from the input `port`, without updating the port to point to the following character. Whereas `peek-char` returns a character, this function returns an integer between 0and 255.

-
+
 `(eof-object? obj)` R5RS procedure

Returns `#t` if `obj` is an end of file object, otherwise returns `#f`.

-
+
 `(eof-object)` STklos procedure
-
+
Returns an end of file object. Note that the special notation `#eof` is another way to return such an end of file object.

-
+
 `(char-ready?)` R5RS procedure
`(char-ready? port)`

Returns `#t` if a character is ready on the input port and returns `#f` @@ -3644,7 +3649,7 @@ the given port is guaranteed not to hang. If the port is at end of file then `char-ready?` returns `#t`. Port may be omitted, in which case it defaults to the value returned by `current-input-port`.

-
+
 `(read-string k)` R7RS procedure
`(read-string k port)`

Reads the next `k` characters, or as many as are available @@ -3653,7 +3658,7 @@ newly allocated string in left-to-right order and returns the string. If no characters are available before the end of file, an end-of-file object is returned.

-
+
 `(read-u8)` R7RS procedure
`(read-u8 port)`

Returns the next byte available from the binary input `port`, @@ -3664,7 +3669,7 @@ bytes are available, an end-of-file object is returned. Note: This function is similar to the `read-byte` function, excepted that it can be used only on a binary port.

-
+
 `(peek-u8)` R7RS procedure
`(peek-u8 port)`

Returns the next byte available from the binary input `port`, @@ -3676,7 +3681,7 @@ is returned. Note: This function is similar to the `peek-byte` function, excepted that it can be used only on a binary port.

-
+
 `(u8-ready?)` R7RS procedure
`(u8-ready? port)`

Returns #t if a byte is ready on the binary input `port` and @@ -3685,7 +3690,7 @@ next read-u8 operation on the given port is guaranteed not to hang. If the `port` is at end of file then `u8-ready?` returns #t.

-
+
 `(read-line)` STklos procedure
`(read-line port)`

Reads the next line available from the input port `port`. This function @@ -3700,7 +3705,7 @@ in which case it defaults to the value returned by `current-input-portcall-with-values`, the second value returned by this procedure is ignored.

-
+
 `(read-from-string str)` STklos procedure

Performs a read from the given `str`. If `str` is the empty string, @@ -3713,7 +3718,7 @@ an end of file object is returned.

-
+
 `(port->string port)` STklos procedure
`(port->sexp-list port)`
`(port->string-list port)`

All these procedure take a port opened for reading. `Port->string` reads @@ -3732,7 +3737,7 @@ file `"foo"` is formed of two lines which contains respecti

#### 4.12.3 Output

-
+
 `(write obj)` R5RS procedure
`(write obj port)`

Writes a written representation of `obj` to the given `port`. Strings that @@ -3742,7 +3747,7 @@ by backslashes. Character objects are written using the #\ notation. `Write` returns an unspecified value. The `port` argument may be omitted, in which case it defaults to the value returned by `current-output-port`.

-
+ -
 `(write-shared obj)` R7RS procedure
`(write-shared obj port)`

Writes a written representation of `obj` to the given port. The @@ -3755,8 +3760,8 @@ notations (see Circular-structure The name `write*` was the name used by STklos for `write-shared` before it was introduced in R7RS.

-
+

+
 `(write-with-shared-structure obj)` STklos procedure
`(write-with-shared-structure obj port)`
`(write-with-shared-structure obj port optarg)`
`(write/ss obj)`
`(write/ss obj port)`
`(write/ss obj port optarg)`

`write-with-shared-structure` has been added to be compatible with @@ -3767,7 +3772,7 @@ in SRFI-38 (External representation of shared structures), is a `write-with-shared-structure`.

-
+
 `(display obj)` R5RS procedure
`(display obj port)`

Writes a representation of `obj` to the given `port`. Strings that @@ -3784,13 +3789,13 @@ output and `display` is for producing human-readable output. Note: As required by R7RS does not loop forever when `obj` contains self-references.

-
+
 `(display-shared obj)` STklos procedure
`(display-shared obj port)`

The `display-shared` procedure is the same as `display`, except that shared structure are represented using datum labels.

-
+
 `(display-simple obj)` STklos procedure
`(display-simple obj port)`

The `display-simple` procedure is the same as `display`, except @@ -3798,7 +3803,7 @@ that shared structure is never represented using datum labels. This can cause `display-simple` not to terminate if `obj` contains circular structure.

-
+
 `(newline)` R5RS procedure
`(newline port)`

Writes an end of line to `port`. Exactly how this is done differs from @@ -3806,24 +3811,24 @@ one operating system to another. Returns an unspecified value. The `portcurrent-output-port`.

-
+
 `(write-string string)` R7RS procedure
`(write-string string port)`
`(write-string string port start)`
`(write-string string port start end)`

Writes the characters of `string` from `start` to `end` in left-to-right order to the textual output `port`.

-
+
 `(write-u8 byte)` R7RS procedure
`(write-u8 byte port)`

Writes the `byte` to the given binary output port.

-
+
 `(write-bytevector bytevector)` R7RS procedure
`(write-bytevector bytevector port)`
`(write-bytevector bytevector port start)`
`(write-bytevector bytevector port start end)`

Writes the bytes of `bytevector` from `start` to `end` in left-to-right order to the binary output `port`.

-
+
 `(write-char char)` R5RS procedure
`(write-char char port)`

Writes the character `char` (not an external representation of the @@ -3831,7 +3836,7 @@ character) to the given `port` and returns an unspecified value. The `port` argument may be omitted, in which case it defaults to the value returned by `current-output-port`.

-
+
 `(write-chars str)` STklos procedure
`(write-char str port)`

Writes the character of string `str` to the given `port` and @@ -3844,13 +3849,13 @@ faster than `display` for strings. Furthermore, this primitive does not use the buffer associated to `port`.

-
+ -
 `(write-byte b)` STklos procedure
`(write-byte b port)`

Write byte `b` to the port. `b` must be an exact integer in range between 0 and 255.

-
+

+
 `(format port str obj ...)` STklos procedure
`(format str obj)`

Writes the `obj`s to the given `port`, according to the format @@ -3922,21 +3927,21 @@ given the value `#f`. SRFI-48 (Intermediate Format Strings).

-
+
 `(flush-output-port)` STklos procedure
`(flush-output-port port)`

Flushes the buffer associated with the given output `port`. The `port` argument may be omitted, in which case it defaults to the value returned by `current-output-port`

-
+
 `(print obj ...)` STklos procedure
`(printerr obj ...)`

These procedures display all their arguments followed by a newline. The procedure `print` uses the standard output port, whereas `printerr` uses the current error port

-
+

### 4.13 System interface

-
 `(printf fmt obj ...)` STklos procedure
`(fprintf port fmt obj ...)`
`(eprintf fmt obj ...)`

These procedures are specialized version of `format`. @@ -3949,8 +3954,8 @@ flushes the characters printed).
-
+
+
 `(load filename)` R5RS procedure

`Filename` should be a string naming an existing file containing Scheme @@ -3963,7 +3968,7 @@ If the file whose name is `filename` cannot be located, `loadload-path` with the suffixes given by `load-suffixes`.

-
+
 `(try-load filename)` STklos procedure

`try-load` tries to load the file named `filename`. As `load`, @@ -3972,7 +3977,7 @@ and a set of suffixes if `filename` cannot be loaded. If ```try-lo is able to find a readable file, it is loaded, and try-load returns #t. Otherwise, try-load retuns #f.```

-
+
 `(find-path str)` STklos procedure
`(find-path str path)`
`(find-path str path suffixes)`

In its first form, `find-path` returns the path name of the file @@ -3995,12 +4000,12 @@ For instance, on a "classical" Unix box:

-
+
 `(current-loading-file)` STklos procedure

Returns the path of the file that is currently being load.

-
+
 `(require string)` STklos procedure
`(provide string)`
`(require/provide string)`
`(provided? string)`

`Require` loads the file whose name is `string` if it was not @@ -4012,36 +4017,36 @@ a `require` followed by a `provide`. `Provided?`

#### 4.13.2 File Primitives

-
+
 `(temporary-file-name)` STklos procedure

Generates a unique temporary file name. The value returned by `temporary-file-name` is the newly generated name of `#f` if a unique name cannot be generated.

-
+
 `(rename-file string1 string2)` STklos procedure

Renames the file whose path-name is `string1` to a file whose path-name is `string2`. The result of `rename-file` is void.

-
+ +reasons.
 `(delete-file string)` R7RS procedure

Removes the file whose path name is given in `string`. The result of `delete-file` is void.

This function is also called `remove-file` for compatibility -reasons.

-
+
 `(copy-file string1 string2)` STklos procedure

Copies the file whose path-name is `string1` to a file whose path-name is `string2`. If the file `string2` already exists, its content prior the call to `copy-file` is lost. The result of `copy-file` is void.

-
+
 `(copy-port in out)` STklos procedure
`(copy-port in out max)`

Copy the content of port `in`, which must be opened for reading, on @@ -4050,32 +4055,32 @@ All the characters from the input port are copied on ouput port. If `maxin` to `out`.

-
+
 `(file-exists? string)` R7RS procedure

Returns `#t` if the path name given in `string` denotes an existing file; returns `#f` otherwise.

-
+
 `(file-is-directory? string)` STklos procedure
`(file-is-regular? string)`
`(file-is-readable? string)`
`(file-is-writable? string)`
`(file-is-executable? string)`

Returns `#t` if the predicate is true for the path name given in `string`; returns `#f` otherwise (or if `string` denotes a file which does not exist).

-
+
 `(file-size string)` STklos procedure

Returns the size of the file whose path name is given in `string`.If `string` denotes a file which does not exist, `file-size` returns `#f`.

-
+
 `(getcwd)` STklos procedure

Returns a string containing the current working directory.

-
+
 `(chmod str)` STklos procedure
`(chmod str option1 ...)`

Change the access mode of the file whose path name is given in `string`. @@ -4091,42 +4096,42 @@ is equivalent to pass it the integer `0`. If the operation succeeds,

-
+
 `(chdir dir)` STklos procedure

Changes the current directory to the directory given in string `dir`.

-
+
 `(make-directory dir)` STklos procedure

Create a directory with name `dir`.

-
+
 `(make-directories str)` STklos procedure

Create a directory with name `dir`. No error is signaled if `dir` already exists, Parent directories of `dir` are created as needed.

-
+
 `(ensure-directories-exist path)` STklos procedure

Create a directory with name `dir` (and its parent directories if needed), if it does not exist yet.

-
+
 `(remove-directory dir)` STklos procedure
`(delete-directory dir)`

Delete the directory with name `dir`.

Note: The name `remove-directory` is kept for compatibility.

-
+ -
 `(directory-files path)` STklos procedure

Returns the list of the files in the directory `path`. Directories "." and ".." don't appear in the result.

-
+

+
 `(expand-file-name path)` STklos procedure

`Expand-file-name` expands the filename given in `path` to @@ -4140,7 +4145,7 @@ an absolute path.

-
+
 `(canonical-file-name path)` STklos procedure

Expands all symbolic links in `path` and returns its canonicalized @@ -4148,7 +4153,7 @@ absolute path name. The resulting path does not have symbolic links. If `path` doesn't designate a valid path name, `canonical-file-name` returns `#f`.

-
+
 `(decompose-file-name string)` STklos procedure

Returns an ``exploded'' list of the path name components given in @@ -4163,7 +4168,7 @@ Each component of this list is a string.

-
+
 `(winify-file-name fn)` STklos procedure

On Win32 system, when compiled with the Cygwin environment, @@ -4180,7 +4185,7 @@ file name

-
+
 `(posixify-file-name fn)` STklos procedure

On Win32 system, when compiled with the Cygwin environment, @@ -4195,7 +4200,7 @@ file name

-
+
 `(basename str)` STklos procedure

Returns a string containing the last component of the path name @@ -4206,7 +4211,7 @@ given in `str`.

-
+
 `(dirname str)` STklos procedure

Returns a string containing all but the last component of the path @@ -4217,7 +4222,7 @@ name given in `str`.

-
+
 `(file-suffix pathname)` STklos procedure

Returns the suffix of given `pathname`. If no suffix is found, `file-suffix` @@ -4229,7 +4234,7 @@ returns an empty string.

-
+
 `(file-prefix pathname)` STklos procedure

Returns the suffix of given `pathname`. @@ -4240,13 +4245,13 @@ returns an empty string.

-
+
 `(file-separator)` STklos procedure

Retuns the operating system file separator as a character. This is typically #\/ on Unix (or Cygwin) systems and #\\ on Windows.

-
+
 `(make-path dirname . names)` STklos procedure

Builds a file name from the directory `dirname` and `names`. For instance, @@ -4257,7 +4262,7 @@ on a Unix system:

-
+
 `(glob pattern ...)` STklos procedure

`Glob` performs file name ``globbing'' in a fashion similar to the @@ -4291,7 +4296,7 @@ in csh no check for existence is made unless a pattern contains a

#### 4.13.3 Environment

-
+
 `(getenv str)` STklos procedure
`(getenv)`

Looks for the environment variable named `str` and returns its @@ -4308,20 +4313,20 @@ A-list.

-
+
 `(setenv! var value)` STklos procedure

Sets the environment variable `var` to `value`. `Var` and `value` must be strings. The result of `setenv!` is void.

-
+
 `(unsetenv! var)` STklos procedure

Unsets the environment variable `var`. `Var` must be a string. The result of `unsetenv!` is void.

STklos defines also the R7RS (and SRFI-96) standard primivitives to acess environment variables.

-
+
 `(get-environment-variable name)` R7RS procedure

Returns the value of the named environment variable as a string, or @@ -4330,7 +4335,7 @@ is expected to be a string. This function is similar to the `getenv`. has been added to be support SRFI-98 (Interface to access environment variables).

-
+
 `(get-environment-variables)` R7RS procedure

Returns names and values of all the environment variables as an a-list. @@ -4339,7 +4344,7 @@ This function is defined by

#### 4.13.4 Time

-
+
 `(current-second)` R7RS procedure

Returns an inexact number representing the current time on the @@ -4348,7 +4353,7 @@ midnight on January 1, 1970 TAI (equivalent to ten seconds before midnight Universal Time) and the value 1.0 represents one TAI second later.

-
+
 `(current-jiffy)` R7RS procedure

Returns the number of jiffies as an exact integer that @@ -4359,7 +4364,7 @@ a second which is defined by the return value of the guaranteed to be constant during a run of the program, but may vary between runs.

-
+
 `(jiffies-per-seconds)` R7RS procedure

Returns an exact integer representing the number of jiffies @@ -4376,13 +4381,13 @@ per second.

-
+
 `(clock)` STklos procedure

Returns an approximation of processor time, in milliseconds, used so far by the program.

-
+
 `(sleep n)` STklos procedure

Suspend the execution of the program for at `ms` milliseconds. Note that due @@ -4390,7 +4395,7 @@ to system clock resolution, the pause may be a little bit longer. If a signal arrives during the pause, the execution may be resumed.

-
+
 `(time expr1 expr2 ...)` STklos syntax

Evaluates the expressions `expr1`, `expr2`, ... and returns the @@ -4399,7 +4404,7 @@ for this evaluation on the current error port.

#### 4.13.5 System Informations

-
+
 `(features)` R7RS procedure

Returns a list of the feature identifiers which `cond-expand` @@ -4414,7 +4419,7 @@ example of what `features` might return:

-
+
 `(running-os)` STklos procedure

Returns the name of the underlying Operating System which is running @@ -4422,61 +4427,61 @@ the program. The value returned by `runnin-os` is a symbol. For now, this procedure returns either `unix`, `windows`, or `cygwin-windows`.

-
+
 `(hostname)` STklos procedure

Return the host name of the current processor as a string.

-
+
 `(argc)` STklos procedure

Returns the number of argument present on the command line

-
+
 `(argv)` STklos procedure

Returns a list of the arguments given on the shell command line. The interpreter options are no included in the result

-
+
 `(command-line)` R7RS procedure

Returns the command line passed to the process as a list of strings. The first string corresponds to the command name.

-
+
 `(program-name)` STklos procedure

Returns the invocation name of the current program as a string.

-
+
 `(version)` STklos procedure

Returns a string identifying the current version of the system. A version is constituted of three numbers separated by a point: the version, the release and sub-release numbers.

-
+
 `(machine-type)` STklos procedure

Returns a string identifying the kind of machine which is running the program. The result string is of the form ``(os-name)-`(os-version)-`(processor-type)`.

-
+
 `(getpid)` STklos procedure

Returns the system process number of the current program (i.e. the Unix pid) as an integer.

#### 4.13.6 Program Arguments Parsing

-

STklos provides a simple way to parse program arguments with the +

STklos provides a simple way to parse program arguments with the |parse-arguments| special form. This form is generally used into the |main| function in a Scheme script. See SRFI-22 (Running Scheme Scripts on Unix) on how to use a |main| function in a Scheme program.

-
+
 `(parse-arguments ...)` STklos procedure

The `parse-arguments` special form is used to parse the @@ -4619,7 +4624,7 @@ to set the output in the `bar` file for the previous example can be e

-
+
 `(arg-usage port)` STklos procedure
`(arg-usage port as-sexpr)`

This procedure is only bound inside a `parse-arguments` form. @@ -4632,13 +4637,13 @@ strings need to be manipulated by a program.

#### 4.13.7 Misc. System Procedures

-
+
 `(system string)` STklos procedure

Sends the given `string` to the system shell `/bin/sh`. The result of `system` is the integer status code the shell returns.

-
+
 `(exec str)` STklos procedure
`(exec-list str)`

These procedures execute the command given in `str`. The command given @@ -4653,12 +4658,12 @@ the output of `str`.

-
+
 `(address-of obj)` R5RS procedure

Returns the address of the object `obj` as an integer.

-
+
 `(exit)` STklos procedure
`(exit ret-code)`

Exits the program with the specified integer return code. If `ret-code` @@ -4669,7 +4674,7 @@ they are called (in an order which is the reverse of their call order). Note: The STklos `exit` primitive accepts also an integer value as parameter (R7RS accepts only a boolean).

-
+
 `(emergency-exit)` STklos procedure
`(emergency-exit ret-code)`

Terminates the program without running any outstanding @@ -4679,21 +4684,21 @@ value to the operating system in the same manner as `exit`. Note: The STklos `emergency-exit` primitive accepts also an integer value as parameter (R7RS accepts only a boolean).

-
+
 `(die message)` STklos procedure
`(die message status)`

`Die` prints the given `message` on the current error port and exits the program with the `status` value. If `status` is omitted, it defaults to 1.

-
+
 `(get-password)` STklos procedure

This primitive permits to enter a password (character echoing being turned off). The value returned by `get-password` is the entered password as a string.

-
+
 `(register-exit-function! proc)` STklos procedure

This function registers `proc` as an exit function. This function will @@ -4713,10 +4718,10 @@ is undefined.

### 4.14 Keywords

-

Keywords are symbolic constants which evaluate to themselves. +

Keywords are symbolic constants which evaluate to themselves. A keyword is a symbol whose first (or last) character is a colon (":").

-
+
 `(keyword obj)` STklos procedure

Returns `#t` if `obj` is a keyword, otherwise returns `#f`. @@ -4730,7 +4735,7 @@ A keyword is a symbol whose first (or last) character is a colon

-
+
 `(make-keyword s)` STklos procedure

Builds a keyword from the given `s`. The parameter `s` must be a symbol @@ -4743,19 +4748,19 @@ or a string.

-
+
 `(keyword->string key)` STklos procedure

Returns the name of `key` as a string. The result does not contain a colon.

-
+
 `(string->keyword str)` STklos procedure

This function function has been added to be compatibe with SRFI-88. It is equivalent to make-keyword, except that the parameter cannot be a symbol.

-
+
 `(key-get list key)` STklos procedure
`(key-get list key default)`

`List` must be a list of keywords and their respective values. @@ -4772,7 +4777,7 @@ specified.

-
+
 `(key-set! list key value)` STklos procedure

`List` must be a list of keywords and their respective values. @@ -4788,7 +4793,7 @@ If the key is already present in `list`, the keyword list is

-
+
 `(key-delete list key)` STklos procedure
`(key-delete! list key)`

`List` must be a list of keywords and their respective values. @@ -4805,7 +4810,7 @@ same job than `key-delete` by physically modifying its `list`

### 4.15 Hash Tables

-

A hash table consists of zero or more entries, each consisting of a key +

A hash table consists of zero or more entries, each consisting of a key and a value. Given the key for an entry, the hashing function can very quickly locate the entry, and hence the corresponding value. There may be at most one entry in a hash table with a particular key, but many @@ -4817,7 +4822,7 @@ defined in SRFI- (Basic Hash Tables). Note that the default comparison function is `eq?` whereas it is `equal?` in this SRFI. See SRFIs for more information.

-
+
 `(make-hash-table)` STklos procedure
`(make-hash-table comparison)`
`(make-hash-table comparison hash)`

`Make-hash-table` admits three different forms. The most general form @@ -4876,12 +4881,12 @@ not perfect, hash table: `string=?` are handled in an more efficient way (in fact, they don't use the `hash-table-hash` function to speed up hash table retrievals).

-
+ -
 `(hash-table? obj)` STklos procedure

Returns `#t` if `obj` is a hash table, returns `#f` otherwise.

-
+

+
 `(hash-table-hash obj)` STklos procedure

Computes a hash code for an object and returns this hash code as a @@ -4895,7 +4900,7 @@ non negative integer. A property of `hash-table-hash` is that as the the Common Lisp `sxhash` function from which this procedure is modeled.

-
+
 `(alist->hash-table alist)` STklos procedure
`(alist->hash-table alist comparison)`
`(alist->hash-table alist comparison hash)`

Returns hash-table built from the ``association list'' @@ -4906,7 +4911,7 @@ occurs multiple times in `alist`, the value in the first association will take precedence over later ones.

-
+
 `(hash-table->alist hash)` STklos procedure

Returns an ``association list'' built from the entries in `hash`. @@ -4925,13 +4930,13 @@ entry's key and whose `cdr` is its value.

-
+
 `(hash-table-set! hash key value)` STklos procedure

Enters an association between `key` and `value` in the`hash` table. The value returned by `hash-table-set!` is void.

-
+
 `(hash-table-ref hash key)` STklos procedure
`(hash-table-ref hash key thunk)`

Returns the value associated with `key` in the given `hash` table. If no @@ -4955,7 +4960,7 @@ called and its value is returned; otherwise an error is raised.

-
+
 `(hash-table-ref/default hash key default)` STklos procedure

This function is equivalent to @@ -4965,7 +4970,7 @@ called and its value is returned; otherwise an error is raised.

-
+
 `(hash-table-delete! hash key)` STklos procedure

Deletes the entry for `key` in `hash`, if it exists. Result of @@ -4982,13 +4987,13 @@ called and its value is returned; otherwise an error is raised.

-
+
 `(hash-table-exists? hash key)` STklos procedure

Returns `#t` if there is any association of `key` in `hash`. Returns `#f` otherwise.

-
+
 `(hash-table-update! hash key update-fun thunk)` STklos procedure
`(hash-table-update!/default hash key update-fun default)`

Update the value associated to `key` in table `hash` if key is already in @@ -5019,7 +5024,7 @@ is equivalent to

-
+
 `(hash-table-for-each hash proc)` STklos procedure
`(hash-table-walk hash proc)`

`Proc` must be a procedure taking two arguments. `Hash-table-for-each` @@ -5045,7 +5050,7 @@ the first argument and the value as the second. The value returned by

-
+
 `(hash-table-map hash proc)` STklos procedure

`Proc` must be a procedure taking two arguments. `Hash-table-map` @@ -5066,12 +5071,12 @@ unspecified order.

-
+
 `(hash-table-keys hash)` STklos procedure
`(hash-table-values hash)`

Returns the keys or the values of `hash`.

-
+
 `(hash-table-fold hash func init-value)` STklos procedure

This procedure calls `func` for every association in `hash` @@ -5091,33 +5096,33 @@ For instance, the following expression computes the number of associations present in the `ht` hash table.

-
+
 `(hash-table-copy hash)` STklos procedure

Returns a copy of `hash`.

-
+
 `(hash-table-merge! hash1 hash2)` STklos procedure

Adds all mappings in `hash2` into `hash1` and returns the resulting hash table. This function may modify `hash1` destructively.

-
+
 `(hash-table-equivalence-function hash)` STklos procedure

Returns the equivalence predicate used for keys in `hash`.

-
+
 `(hash-table-hash-function hash)` STklos procedure

Returns the hash function used for keys in `hash`.

-
+
 `(hash-table-size hash)` STklos procedure

Returns the number of entries in the `hash`.

-
+
 `(hash-table-stats hash)` STklos procedure
`(hash-table-stats hash port)`

Prints overall information about `hash`, such as the number of entries @@ -5132,7 +5137,7 @@ representation which consists is an integer which represents the number of seconds elapsed since the Epoch (00:00:00 on January 1, 1970, Coordinated Universal Time --UTC). Dates can also be represented with date structures.

-
+
 `(current-second)` R7RS procedure

Returns an inexact number representing the current time on the @@ -5141,7 +5146,7 @@ midnight on January 1, 1970 TAI (equivalent to ten seconds before midnight Universal Time) and the value 1.0 represents one TAI second later.

-
+
 `(current-seconds)` STklos procedure

Returns the time since the Epoch (that is 00:00:00 UTC, January 1, 1970), @@ -5153,17 +5158,17 @@ and whose result is expressed using the International Atomic Time instead of UTC.

-
+
 `(current-time)` STklos procedure

Returns a time object corresponding to the current time.

-
+
 `(time? obj)` STklos procedure

Return `#t` if `obj` is a time object, othererwise returns `#f`.

-
+
 `(time->seconds time)` STklos procedure

Convert the time object `time` into an inexact real number representing @@ -5174,7 +5179,7 @@ the number of seconds elapsed since the Epoch.

-
+
 `(seconds->time x)` STklos procedure

Converts into a time object the real number `x` representing the number @@ -5186,64 +5191,64 @@ of seconds elapsed since the Epoch.

-
+
 `(current-date)` STklos procedure

Returns the current system date.

-
+
 `(make-date :key second minute hour day month year)` STklos procedure

Build a date from its argument. `hour`, `minute`, `second` default to 0; `day` and `month` default to 1; `year` defaults to 1970

-
+
 `(date? obj)` STklos procedure

Return `#t` if `obj` is a date, and otherwise returns `#f`.

-
+
 `(date-second d)` STklos procedure

Return the second of date `d`, in the range 0 to 59.

-
+
 `(date-minute d)` STklos procedure

Return the minute of date `d`, in the range 0 to 59.

-
+
 `(date-hour d)` STklos procedure

Return the hour of date `d`, in the range 0 to 23.

-
+
 `(date-day d)` STklos procedure

Return the day of date `d`, in the range 1 to 31

-
+
 `(date-month d)` STklos procedure

Return the month of date `d`, in the range 1 to 12

-
+
 `(date-year d)` STklos procedure

Return the year of date `d`.

-
+
 `(date-week-day d)` STklos procedure

Return the week day of date `d`, in the range 0 to 6 (0 is Sunday).

-
+
 `(date-year-day d)` STklos procedure

Return the the number of days since January 1 of date `d`, in the range 1 to 366.

-
+
 `(date-dst d)` STklos procedure

Return an indication about daylight saving adjustment: @@ -5252,30 +5257,30 @@ of seconds elapsed since the Epoch.
• -1 if the information is not available

• -
+
 `(date-tz d)` STklos procedure

Return the time zone of date `d`.

-
+
 `(date->seconds d)` STklos procedure

Convert the date `d` to the number of seconds since the Epoch.

-
+
 `(date->string format d)` STklos procedure

Convert the date `d` using the string `format` as a specification. Conventions for format are the same as the one of seconds--string.

-
+
 `(seconds->date n)` STklos procedure

Convert the date `n` expressed as a number of seconds since the Epoch to a date.

-
+
 `(seconds->string format n)` STklos procedure

Convert a date expressed in seconds using the string `format` as a @@ -5324,7 +5329,7 @@ specification. Conventions for `format` are given below:
• ~Z symbol time zone

• -
+
 `(seconds->list sec)` STklos procedure

Returns a keyword list for the date given by `sec` (a date based on the @@ -5351,7 +5356,7 @@ Epoch). The keyed values returned are

-
+ @@ -5361,7 +5366,7 @@ Epoch). The keyed values returned are the make-box, make-constant-box or the read primitives. A box produced by read (using the "#&" notation) is mutable. Note that two boxes are equal?iff their content are equal?.

 `(date)` STklos procedure

Returns the current date in a string
-
+
 `(make-box obj)` STklos procedure

Returns a new box that contains `obj`. The box is mutable. @@ -5372,38 +5377,38 @@ two boxes are equal? iff their content are equal?.

-
+
 `(make-constant-box obj)` STklos procedure

Returns a new box that contains `obj`. The box is immutable.

-
+
 `(box? obj)` STklos procedure

Returns `#t` if `obj`is box, `#f` otherwise.

-
+
 `(box-mutable? obj)` STklos procedure

Returns `#t` if `obj`is mutable box, `#f` otherwise.

-
+
 `(box-set! box x)` STklos procedure

Sets the content of `box` to `x`. The box must be mutable.

-
+
 `(unbox box)` STklos procedure

Returns the content of `box`. For any `obj`, `(unbox (make-box obj))` returns `obj`.

### 4.18 Processes

-

STklos provides access to Unix processes as first class objects. Basically, a process contains several informations such as the standard system process identification (aka PID on Unix Systems), the files where the standard files of the process are redirected.

-
+
 `(run-process command p1 p2 ...)` STklos procedure

`run-process` creates a new process and run the executable @@ -5449,23 +5454,23 @@ printed by this command are stored in the file `/tmp/X`

-
+
 `(process? obj)` STklos procedure

Returns `#t` if `obj` is a process , otherwise returns `#f`.

-
+
 `(process-alive? proc)` STklos procedure

Returns `#t` if process `proc` is currently running, otherwise returns `#f`.

-
+
 `(process-pid proc)` STklos procedure

Returns an integer which represents the Unix identification (PID) of the processus.

-
+
 `(process-input proc)` STklos procedure
`(process-output proc)`
`(process-error proc)`

Returns the file port associated to the standard input, output or error @@ -5474,20 +5479,20 @@ returns `#f`. Note that the returned port is opened for reading when calling `process-output` or `process-error`; it is opened for writing when calling `process-input`.

-
+
 `(process-wait proc)` STklos procedure

Stops the current process (the Scheme process) until `proc` completion. `Process-wait` returns `#f` when `proc` is already terminated; it returns `#t` otherwise.

-
+
 `(process-exit-status proc)` STklos procedure

Returns the exit status of `proc` if it has finished its execution; returns `#f` otherwise.

-
+
 `(process-signal proc sig)` STklos procedure

Sends the integer signal `sig` to `proc`. Since value of `sig` is system @@ -5495,7 +5500,7 @@ dependant, use the symbolic defined signal constants to make your program independant of the running system (see signals). The result of `process-signal` is void.

-
+
 `(process-kill proc)` STklos procedure

Kills (brutally) `process`. The result of `process-kill` @@ -5506,7 +5511,7 @@ is void. This procedure is equivalent to

-
+
 `(process-stop proc)` STklos procedure
`(process-continue proc)`

`Process-stop` stops the execution of `proc` and `process-continue` resumes @@ -5518,12 +5523,12 @@ its execution. They are equivalent, respectively, to

-
+
 `(process-list)` STklos procedure

Returns the list of processes which are currently running (i.e. alive).

-
+
 `(fork)` STklos procedure
`(fork thunk)`

This procedure is a wrapper around the standard Unix `fork` system @@ -5539,11 +5544,11 @@ value returned in the parent process is a process object representing the child process.

### 4.19 Sockets

-

STklos defines sockets, on systems which support them, +

STklos defines sockets, on systems which support them, as first class objects. Sockets permits processes to communicate even if they are on different machines. Sockets are useful for creating client-server applications.

-
+
 ` (make-client-socket hostname port-number)` STklos procedure
` (make-client-socket hostname port_number line-buffered)`

`make-client-socket` returns a new socket object. This socket @@ -5555,14 +5560,14 @@ as a `#\newline` character is encountered). The default value of `line-buffered` is `#t`.

-
+
 `(make-server-socket)` STklos procedure
`(make-server-socket port-number)`

`make-server-socket` returns a new socket object. If `port-number` is specified, the socket is listening on the specified port; otherwise, the communication port is chosen by the system.

-
+
 `(socket-shutdown sock)` STklos procedure
`(socket-shutdown sock close)`

`Socket-shutdown` shutdowns the connection associated to @@ -5589,7 +5594,7 @@ go back waiting for further client connections.

-
+
 `(socket-accept socket)` STklos procedure
`(socket-accept socket line-buffered)`

`socket-accept` waits for a client connection on the given @@ -5603,7 +5608,7 @@ with `make-server-socket`. The result of `socket-accept` i line buffered. If `line-buffered` is omitted, it defaults to `#t`.

The following example is a simple server which waits for a connection -on the port 12345 1. +on the port 12345 1. Once the connection with the distant program is established, we read a line on the input port associated to the socket and we write the length of this line on its @@ -5622,22 +5627,22 @@ output port. Note that shutting down the `server` socket suffices here to close also the connection to `client`.

-
+
 `(socket? obj)` STklos procedure

Returns `#t` if `socket` is a socket, otherwise returns `#f`.

-
+
 `(socket-server? obj)` STklos procedure

Returns `#t` if `socket` is a server socket, otherwise returns `#f`.

-
+
 `(socket-client? obj)` STklos procedure

Returns `#t` if `socket` is a client socket, otherwise returns `#f`.

-
+
 `(socket-host-name socket)` STklos procedure

Returns a string which contains the name of the distant host @@ -5648,7 +5653,7 @@ created with `make-server-socket`, this function returns the official name of the client connected to the socket. If no client has used yet `socket`, this function returns `#f`.

-
+
 `(socket-host-address socket)` STklos procedure

Returns a string which contains the IP number of the distant host @@ -5659,18 +5664,18 @@ with `make-server-socket`, this function returns the address of the client connected to the socket. If no client has used yet `socket`, this function returns `#f`.

-
+
 `(socket-local-address socket)` STklos procedure

Returns a string which contains the IP number of the local host attached to `socket`.

-
+
 `(socket-port-number socket)` STklos procedure

Returns the integer number of the port used for `socket`.

-
+
 `(socket-input socket)` STklos procedure
`(socket-output socket)`

Returns the file port associated for reading or writing with the @@ -5678,7 +5683,7 @@ program connected with `socket`. If no connection has already been established, these functions return `#f`. The following example shows how to make a client socket. Here we -create a socket on port 13 of the machine `kaolin.unice.fr`2: +create a socket on port 13 of the machine `kaolin.unice.fr`2:
 ```(let ((s (make-client-socket "kaolin.unice.fr" 13))) (format #t "Time is: ~A~%" (read-line (socket-input s))) @@ -5693,7 +5698,7 @@ create a socket on port 13 of the machine `kaolin.unice.fr`STklos parameters correspond to the ones defined in SRFI-39 (Parameters objects). See SRFI document for more information. - + `(make-parameter init)`STklos procedure `(make-parameter init converter)`Returns a new parameter object which is bound in the global dynamic @@ -5743,7 +5748,7 @@ an unspecified value is returned. - + `(parameterize ((expr1 expr2) ...) )`STklos syntax The expressions `expr1` and `expr2` are evaluated in an unspecified order. @@ -5772,25 +5777,25 @@ the ``. - + `(parameter? obj)`STklos procedure Returns `#t` if `obj` is a parameter object, otherwise returns `#f`. 4.22 Misc - + `(gc)`R5RS procedure Returns the address of the object `obj` as an integer. - + - `(void)`STklos procedure `(void arg1 ...)`Returns the special void object. If arguments are passed to `void`, they are evalued and simply ignored. - + + `(error str obj ...)`STklos procedure `(error name str obj ...)``error` is used to signal an error to the user. The second form @@ -5831,7 +5836,7 @@ and some conform to SRFI-23 (Error reporting mechanism) - + `(signal-error cond str obj ...)`STklos procedure `(signal-error cond name str obj ...)`This procedure is similar to error, except that the type of the error @@ -5845,7 +5850,7 @@ Note that `(error arg ...)` is equivalent to - + `(require-extension ...)`STklos syntax The syntax of require-extension is as follows: @@ -5884,7 +5889,7 @@ is equivalent to the previous `require-extension`. A list of availabl symbols as `` is given in chapter SRFIs. - + `(repl)`STklos procedure `(repl :in inport :out outport :err errport)`This procedure launches a new Read-Eval-Print-Loop. Calls to `repl` can be @@ -5892,7 +5897,7 @@ embedded. The ports used for input/output as well as the error port can be passed when `repl` is called. If not passed, they default to `current-input-port`, `current-output-port` and `current-error-port`. - + `(apropos obj)`STklos procedure `(apropos obj module)``Apropos` returns a list of symbols whose print name contains the @@ -5902,7 +5907,7 @@ be accessed from the given `module` (defaults to the current module i provided). - + `(help obj)`STklos procedure `(help)`When called with an argument, `help` tries to give some help on the @@ -5928,7 +5933,7 @@ strings are given below - + `(trace f-name ...)`STklos syntax Invoking `trace` with one or more function names causes the functions @@ -5938,7 +5943,7 @@ printed on the current error port. Calling `trace` with no argument returns the list of traced functions. - + `(untrace f-name ...)`STklos syntax Invoking `untrace` with one or more function names causes the functions @@ -5947,7 +5952,7 @@ named not to be traced anymore. Calling `untrace` with no argument will untrace all the functions currently traced. - + `(pretty-print sexpr :key port width)`STklos procedure `(pp sexpr :key port width)`This function tries to obtain a pretty-printed representation of `sexpr`. @@ -5959,7 +5964,7 @@ is returned as a string by `pretty-print`. Note that `pp` is another name for `pretty-print`. - + `(uri-parse str)`STklos procedure Parses the string `str` as a RFC-2396 URI and return a keyed list with the @@ -5995,7 +6000,7 @@ empty string) - + `(string->html str)`STklos procedure This primitive is a convenience function; it returns a string where @@ -6008,41 +6013,41 @@ in Scheme, but this version is fast. - + `(md5sum obj)`STklos procedure Return a string contening the md5 dum of `obj`. The given parameter can be a string or an open input port. - + `(md5sum-file str)`STklos procedure Return a string contening the md5 dum of the file whose name is `str`. - + `(base64-encode in)`STklos procedure `(base64-encode in out)`Encode in Base64 the characters from input port `in` to the output port `out`. If `out` is not specified, it defaults to the current output port. - + `(base64-decode in)`STklos procedure `(base64-decode in out)`Decode the Base64 characters from input port `in` to the output port `out`. If `out` is not specified, it defaults to the current output port. - + `(base64-encode-string str)`STklos procedure Return a string contening the contents of `str` converted to Base64 encoded format - + `(base64-encode-string str)`STklos procedure Decode the contents of `str` expressed in Base64. -1: Under Unix, you can simply connect to +1: Under Unix, you can simply connect to a listening socket with the `telnet` command. With the given example, this can be achieved by typing the following command in a window shell: @@ -6052,12 +6057,12 @@ window shell: -2: Port 13 is generally used for testing: +2: Port 13 is generally used for testing: making a connection to it permits to know the distant system's idea of the time of day. This Html page has been produced by - Skribe.Last update Fri Oct 12 17:19:41 2018 + Skribe.Last update Tue Nov 27 20:54:10 2018 diff --git a/doc/html/stklos-ref-5.html b/doc/html/stklos-ref-5.html index 15a85d47a292cf6aabe889ef4905705202b8a1d8..abab1dc78d99b873fe050b344740c7b61f2cbcba 100644 --- a/doc/html/stklos-ref-5.html +++ b/doc/html/stklos-ref-5.html @@ -15,7 +15,7 @@ - + @@ -56,7 +56,7 @@ Contents*Top**Top* 1 Introduction 2 Expressions 3 Program structure -STklos uses the Philip Hazel's Perl-compatible Regular Expression +STklos uses the Philip Hazel's Perl-compatible Regular Expression (PCRE) library for implementing regexps [13]. Consequently, the STklos regular expression syntax is the same as PCRE, and Perl by the way.The following text is extracted from the PCRE package. However, to make @@ -64,7 +64,7 @@ things shorter, some of the original documentation as not been reported here. In particular some possibilities of PCRE have been completely occulted (those whose description was too long and which seems (at least to me), not too important). Read the documentation provided with PCRE -for a complete description 1A regular expression is a pattern that is matched against a +for a complete description 1A regular expression is a pattern that is matched against a subject string from left to right. Most characters stand for themselves in a pattern, and match the corresponding characters in the subject. As a trivial example, the pattern @@ -851,7 +851,7 @@ refer.5.17 Regexp ProceduresThis section lists the Scheme functions that can use PCRE regexpr described before - + `(string->regexp string)`STklos procedure `String->regexp` takes a string representation of a regular @@ -862,13 +862,13 @@ multiple times, it is faster to compile the string once to a regexp value and use it for repeated matches instead of using the string each time. - + `(regexp? obj)`STklos procedure `Regexp` returns `#t` if `obj` is a regexp value created by the `regexp`, otherwise `regexp` returns `#f`. - + `(regexp-match pattern str)`STklos procedure `(regexp-match-positions pattern str)`These functions attempt to match `pattern` (a string or a regexp value) @@ -902,7 +902,7 @@ in the order of the opening parentheses in pattern. - + `(regexp-replace pattern string substitution)`STklos procedure `(regexp-replace-all pattern string substitution)``Regexp-replace` matches the regular expression `pattern` against @@ -940,7 +940,7 @@ To replace all the occurrences of `pattern`, use - + `(regexp-quote str)`STklos procedure Takes an arbitrary string and returns a string where characters of @@ -955,11 +955,11 @@ backslash, so that they safely match only themselves. `regexp-quote` is useful when building a composite regexp from a mix of regexp strings and verbatim strings. -1: The latest release of PCRE is +1: The latest release of PCRE is available from http://www.pcre.org/ This Html page has been produced by - Skribe.Last update Fri Oct 12 17:19:41 2018 + Skribe.Last update Tue Nov 27 20:54:10 2018 diff --git a/doc/html/stklos-ref-6.html b/doc/html/stklos-ref-6.html index 456f412e903b64676f298647169b73b874a82e68..9941d6cf52a1547de94fb25df63d212134f006b2 100644 --- a/doc/html/stklos-ref-6.html +++ b/doc/html/stklos-ref-6.html @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ Contents*Top**Top* 1 Introduction 2 Expressions 3 Program structure5 Regular Expressions 6 Pattern Matching - + 6.1STklos Pattern Matching Facilities6.1STklos Pattern Matching Facilities 6.2The Pattern Language @@ -46,7 +46,7 @@ languages since it allows clean and secure code to be written. Internally, "pattern-matching forms" should be translated (compiled) into cascades of "elementary tests" where code is made as efficient as possible, avoiding redundant tests; STklos -"pattern matching compiler" provides this 1.The technique used is described in details in +"pattern matching compiler" provides this 1.The technique used is described in details in [4], and the code generated can be considered optimalThe "pattern language" allows the expression of a wide variety of patterns, including:Non-linear patterns: pattern variables can appear more than @@ -55,11 +55,11 @@ once, allowing comparison of subparts of the datum (through + 6.1 STklos Pattern Matching Facilities Only two special forms are provided for this in STklos: `match-case` and `match-lambda`. - + `(match-case ...)`STklos syntax The argument key may be any expression and each clause has the form @@ -94,7 +94,7 @@ The equality predicate used for tests is `eq?`. - + `(match-lambda ...)`STklos syntax `match-lambda` expands into a lambda-expression expecting an argument @@ -110,7 +110,7 @@ which, once applied to an expression, behaves exactly like a 6.2 The Pattern Language -The syntax for `` is: +The syntax for `` is: ==> Matches: the . @@ -162,7 +162,7 @@ not appear inside a vector, where you should use `???-`: For example, `#(a ??- b)` or `#(a...)` are invalid patterns, whereas `#(a ???-)` is valid and matches any vector whose first element is the atom `a`. -1: The "pattern matching compiler" has been written by Jean-Marie Geffroy +1: The "pattern matching compiler" has been written by Jean-Marie Geffroy and is part of the Manuel Serrano's Bigloo compiler [1] since several years. The code (and documentation) included in STklos has been stolen from the Bigloo package v2.4 (the only difference @@ -171,6 +171,6 @@ vector whose first element is the atom `a`. - + `(with-handler ... )`STklos syntax Evaluates the sequences of expressions `` to ``. @@ -78,7 +78,7 @@ dynamic-wind) of the evaluations of the expressions - + `(with-exception-handler )`STklos syntax This form is similar to `with-handler`. It uses a thunk instead of @@ -98,7 +98,7 @@ is equivalent to - + `(raise obj)`STklos procedure Invokes the current exception handler on `obj`. The handler is called in @@ -116,7 +116,7 @@ that installed the handler being called. - + `(guard ( ...) )`STklos syntax Evaluating a guard form evaluates `` with an exception handler @@ -152,7 +152,7 @@ current exception handler is that of the `guard` expression. - + `(current-exception-handler)`STklos procedure Returns the current exception handler. This procedure is defined in @@ -181,7 +181,7 @@ one condition type (a condition type can be made from several condition types). Each condition type specifies a set of slot names. A condition belonging to a condition type includes a value for each of the type's slot names. These values can be -extracted from the condition by using the appropriate slot name.There is a tree of condition types with the distinguished `&condition` +extracted from the condition by using the appropriate slot name.There is a tree of condition types with the distinguished `&condition` as its root. All other condition types have a parent condition type.Conditions are implemented with STklos structures (with a special bit indicating that there are conditions). Of course, condition types are implemented with structure types. As a consequence, functions on @@ -192,7 +192,7 @@ condition, the expression is a simple way to see it's slots and their associated value. - + `(make-condition-type id parent slot-names)`STklos procedure `Make-condition-type` returns a new condition type. `Id` must be a symbol @@ -201,12 +201,12 @@ be a condition type. `Slot-names` must be a list of symbols. It ident the slots of the conditions associated with the condition type. - + `(condition-type? obj)`STklos procedure Returns `#t` if `obj` is a condition type, and `#f` otherwise - + `(make-compound-condition-type id ct1 ...)`STklos procedure `Make-compound-condition-type` returns a new condition type, built @@ -217,7 +217,7 @@ union of the slots of conditions `ct1` ... Note: This function is not defined in SRFI-34 (Exception Handling for Programs). - + `(make-condition type slot-name value ...)`STklos procedure `Make-condition` creates a condition value belonging condition type @@ -235,12 +235,12 @@ respective slots. - + `(condition? obj)`STklos procedure Returns `#t` if `obj` is a condition, and `#f` otherwise - + `(condition-has-type? condition condition-type)`STklos procedure `Condition-has-type?` tests if `condition` belongs to `condition-type`. @@ -259,7 +259,7 @@ either directly or as an ancestor and `#f` otherwise. - + `(condition-ref condition slot-name)`STklos procedure `Condition` must be a condition, and `slot-name` a symbol. Moreover, @@ -275,7 +275,7 @@ slot. `Condition-ref` returns the value associated with ```slot-na ``` - + `(condition-set! condition slot-name obj)`STklos procedure `Condition` must be a condition, and `slot-name` a symbol. Moreover, @@ -286,7 +286,7 @@ slot. `Condition-set!` change the value associated with ```slot-na Note: Whereas condition-ref is defined in SRFI-35 (Conditions), confition-set! is not.``` - + `(make-compound-condition condition0 condition1 ...)`STklos procedure `Make-compound-condition` returns a compound condition belonging to @@ -295,7 +295,7 @@ all condition types that the `conditioni` belong to. `Condition-ref`, when applied to a compound condition will return the value from the first of the `conditioni` that has such a slot. - + `(extract-condition condition condition-type)`STklos procedure `Condition` must be a condition belonging to `condition-type`. @@ -315,7 +315,7 @@ is always allocated. 7.3 Predefined Conditions -STklos implements all the conditions types which are defined in +STklos implements all the conditions types which are defined in SRFI-35 (Conditions) and SRFI-36 (I/O Conditions). @@ -347,6 +347,6 @@ loaded. This can be done with the following call This Html page has been produced by - Skribe.Last update Fri Oct 12 17:19:41 2018 + Skribe.Last update Tue Nov 27 20:54:11 2018 diff --git a/doc/html/stklos-ref-8.html b/doc/html/stklos-ref-8.html index e1b26a43c22360ff577cc4d26e5a8346fae82457..0798287f64144dd258f437b96d6a4d51d5aae6a1 100644 --- a/doc/html/stklos-ref-8.html +++ b/doc/html/stklos-ref-8.html @@ -15,7 +15,7 @@ - + @@ -83,7 +83,7 @@ give the reader an idea of the "look and feel" of has some basic notions of OO programming, and is familiar with terms such as classes, instances or methods.8.2.1 Class definition and instantiation - +8.2.1.1 Class definitionA new class is defined with the `define-class` form. The syntax of `define-class` is close to CLOS `defclass`: Contents*Top**Top* 1 Introduction 2 Expressions 3 Program structure @@ -97,7 +97,7 @@ The syntax of `define-class` is close to CLOS `defclass`:< The metaclass option will not be discussed here. The superclasses list specifies the super classes of class -(see inheritance for details).A slot description gives the name of a slot and, +(see inheritance for details).A slot description gives the name of a slot and, eventually, some "properties" of this slot (such as its initial value, the function which permit to access its value, ...). Slot descriptions will be discussed in @@ -120,7 +120,7 @@ contain the coordinates of a 2D point.Let us define now a circle, as a 2D constructed by inheriting from the class `` and adding a new slot (the `radius` slot).8.2.1.2 Instance creation and slot access -Creation of an instance of a previously defined class can +Creation of an instance of a previously defined class can be done with the `make` procedure. This procedure takes one mandatory parameter which is the class of the instance which must be created and a list of optional arguments. Optional @@ -130,7 +130,7 @@ newly created instance. For instance, the following form: creates a new `` object and binds it to the -`c` Scheme variable.Accessing the slots of the newly created circle can be done +`c` Scheme variable.Accessing the slots of the newly created circle can be done with the `slot-ref` and the `slot-set!` primitives. The `slot-set!` primitive permits to set the value of an object slot and `slot-ref` permits to get its @@ -158,17 +158,17 @@ Slots are: 8.2.1.3 Slot Definition -When specifying a slot, a set of options can be given to +When specifying a slot, a set of options can be given to the system. Each option is specified with a keyword. For -instance, :init-form can be used to supply a default +instance, :init-form can be used to supply a default value for the slot. :init-keyword can be used to specify the keyword used for initializing a slot. -:getter can be used to define the name of the +:getter can be used to define the name of the slot getter -:setter can be used to define the name of the +:setter can be used to define the name of the slot setter -:accessor can be used to define the name of the +:accessor can be used to define the name of the slot accessor (see below)To illustrate slot description, we redefine here the `` class seen before. A new definition of this class could be: @@ -195,7 +195,7 @@ defined by the system to read and write the `x` (resp. (get-y p2) ⇒ 0 -Accessors provide an uniform access for reading and writing an object slot. +Accessors provide an uniform access for reading and writing an object slot. Writing a slot is done with an extended form of `set!` which is close to the Common Lisp `setf` macro. A slot accessor can be defined with the `:accessor` option in the slot @@ -224,7 +224,7 @@ As a consequence, we have: 8.2.1.4 Virtual Slots -Suppose that we need a slot named `area` in circle +Suppose that we need a slot named `area` in circle objects which contain the area of the circle. One way to do this would be to add the new slot to the class definition and have an initialisation form for this slot which takes into account the @@ -311,7 +311,7 @@ instance, Note: The order of slots is not significant. 8.2.2.2 Class precedence list -A class may have more than one superclass.1 +A class may have more than one superclass.1 With single inheritance (only one superclass), it is easy to order the super classes from most to least specific. This is the @@ -367,7 +367,7 @@ algorithm:(f d e a c b