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

Unexpected READ-FROM-STRING behavior



Dear Folks:

Am I loosing my mind? I'm getting behavior from READ-FROM-STRING that
seems wrong. It concerns the optional :start argument, which I'm
passing but doesn't seem to be having much effect. Consider the
following three tests in mcl2.0:


    ? (let ((string "(a 23 b)"))
        (read-from-string string :start 0))
    (A 23 B)                            ; right
    8
    ? (let ((string "(a 23 b)"))
        (read-from-string string :start 1))
    (A 23 B)                            ; huh!? should be returning A, right?
    8
    ? (let ((string "(a 23 b)"))
        (read-from-string (subseq string 1 (length string))))
    A                                   ; expected this result in second case
    2
    ? 

The first test does what I expected. The second case shows the problem. The
third case acts like I expected the second case should have. Again, I'm
grateful for any help...


matt