mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Documentation fixes
* doc/ref/api-compound.texi: * doc/ref/api-control.texi: * doc/ref/api-data.texi: Fix typos and clarify.
This commit is contained in:
parent
469970d4b3
commit
96d3cb3fcf
3 changed files with 15 additions and 15 deletions
|
@ -1258,14 +1258,14 @@ is an ordinary array of rank 1 with lower bound 0 in dimension 0.
|
|||
is an ordinary array of rank 1 with lower bound 2 in dimension 0.
|
||||
|
||||
@item #2((1 2 3) (4 5 6))
|
||||
is a non-uniform array of rank 2; a 3@cross{}3 matrix with index ranges 0..2
|
||||
is a non-uniform array of rank 2; a 2@cross{}3 matrix with index ranges 0..1
|
||||
and 0..2.
|
||||
|
||||
@item #u32(0 1 2)
|
||||
is a uniform u8 array of rank 1.
|
||||
|
||||
@item #2u32@@2@@3((1 2) (2 3))
|
||||
is a uniform u8 array of rank 2 with index ranges 2..3 and 3..4.
|
||||
is a uniform u32 array of rank 2 with index ranges 2..3 and 3..4.
|
||||
|
||||
@item #2()
|
||||
is a two-dimensional array with index ranges 0..-1 and 0..-1, i.e.@:
|
||||
|
@ -2877,7 +2877,7 @@ convenient definition that indicates the number of fields in
|
|||
@code{standard-vtable-fields}.
|
||||
|
||||
@defvr {Scheme Variable} standard-vtable-fields
|
||||
A string containing the orderedq set of fields that a vtable must have.
|
||||
A string containing the ordered set of fields that a vtable must have.
|
||||
@end defvr
|
||||
|
||||
@defvr {Scheme Variable} vtable-offset-user
|
||||
|
|
|
@ -168,7 +168,7 @@ Each @code{cond}-clause must look like this:
|
|||
(@var{test} @var{expression} @dots{})
|
||||
@end lisp
|
||||
|
||||
where @var{test} and @var{expression} are arbitrary expression, or like
|
||||
where @var{test} and @var{expression} are arbitrary expressions, or like
|
||||
this
|
||||
|
||||
@lisp
|
||||
|
@ -178,7 +178,7 @@ this
|
|||
where @var{expression} must evaluate to a procedure.
|
||||
|
||||
The @var{test}s of the clauses are evaluated in order and as soon as one
|
||||
of them evaluates to a true values, the corresponding @var{expression}s
|
||||
of them evaluates to a true value, the corresponding @var{expression}s
|
||||
are evaluated in order and the last value is returned as the value of
|
||||
the @code{cond}-expression. For the @code{=>} clause type,
|
||||
@var{expression} is evaluated and the resulting procedure is applied to
|
||||
|
@ -894,7 +894,7 @@ a new values object, and copies into it the @var{n} values starting from
|
|||
@var{base}.
|
||||
|
||||
Currently this creates a list and passes it to @code{scm_values}, but we
|
||||
expect that in the future we will be able to use more a efficient
|
||||
expect that in the future we will be able to use a more efficient
|
||||
representation.
|
||||
@end deftypefn
|
||||
|
||||
|
|
|
@ -1712,7 +1712,7 @@ starts from 0 for the least significant bit.
|
|||
|
||||
@deffn {Scheme Procedure} ash n count
|
||||
@deffnx {C Function} scm_ash (n, count)
|
||||
Return @math{floor(n * 2^count)}.
|
||||
Return @math{floor(n * 2^{count})}.
|
||||
@var{n} and @var{count} must be exact integers.
|
||||
|
||||
With @var{n} viewed as an infinite-precision twos-complement
|
||||
|
@ -5141,7 +5141,7 @@ mapping consistently:
|
|||
@lisp
|
||||
;; 1=red, 2=green, 3=purple
|
||||
|
||||
(if (eq? (colour-of car) 1)
|
||||
(if (eq? (colour-of vehicle) 1)
|
||||
...)
|
||||
@end lisp
|
||||
|
||||
|
@ -5154,7 +5154,7 @@ defining constants:
|
|||
(define green 2)
|
||||
(define purple 3)
|
||||
|
||||
(if (eq? (colour-of car) red)
|
||||
(if (eq? (colour-of vehicle) red)
|
||||
...)
|
||||
@end lisp
|
||||
|
||||
|
@ -5163,7 +5163,7 @@ But the simplest and clearest approach is not to use numbers at all, but
|
|||
symbols whose names specify the colours that they refer to:
|
||||
|
||||
@lisp
|
||||
(if (eq? (colour-of car) 'red)
|
||||
(if (eq? (colour-of vehicle) 'red)
|
||||
...)
|
||||
@end lisp
|
||||
|
||||
|
@ -5185,15 +5185,15 @@ Then a car's combined property set could be naturally represented and
|
|||
manipulated as a list of symbols:
|
||||
|
||||
@lisp
|
||||
(properties-of car1)
|
||||
(properties-of vehicle1)
|
||||
@result{}
|
||||
(red manual unleaded power-steering)
|
||||
|
||||
(if (memq 'power-steering (properties-of car1))
|
||||
(display "Unfit people can drive this car.\n")
|
||||
(display "You'll need strong arms to drive this car!\n"))
|
||||
(if (memq 'power-steering (properties-of vehicle1))
|
||||
(display "Unfit people can drive this vehicle.\n")
|
||||
(display "You'll need strong arms to drive this vehicle!\n"))
|
||||
@print{}
|
||||
Unfit people can drive this car.
|
||||
Unfit people can drive this vehicle.
|
||||
@end lisp
|
||||
|
||||
Remember, the fundamental property of symbols that we are relying on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue