[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More corrections to CLtL



    Date: 26 Sep 85 04:00:01 EDT
    From: Dave <Steiner@BLUE.RUTGERS.EDU>


    I've found several printing bugs in the format chapter.

    1) The code on p. 394 to show the scale factor doesn't work.  It
    should be something like:

    (dotimes (k 13)
      (format t "~%Scale factor ~2D:~:* |~13,6,2,VE|"
	      (- k 5) 3.14159))

    Ie, Missing % at the beginning and a missing ~:* to back up to the
    scale factor again (or add (- k 5) as a third arg in the second
    position and don't include the ~:*).

You are quite right.

    2) The output to this code with scale factor of 7 is missing a 0 after
    the decimal point.  Ie.  |3141590.0E-06|, not | 3141590.E-06|.

I disagree.  In this case k=7 and d=6.  Page 392 specifies that there will
be k (7) digits before the decimal point and d-k+1 (0) digits after the
decimal point.  The requirement on page 393, that a zero digit should
appear after the decimal point if permitted by the width constraint,
applies only in the case that the parameter d is omitted.

    3) The format expr in the function definition of FOO (on p 396) is
    missing a 4th x arg.

Right.

    ds
    uucp:   ...{harvard, seismo, ut-sally, sri-iu, ihnp4!packard}!topaz!steiner
    arpa:   Steiner@RUTGERS
    -------

Thanks for the corrections.  Keep those cards and letters coming!
--Guy