From: Brian M. <br...@ma...> - 2010-09-20 03:01:02
|
On 09/19/2010 09:25 PM, Jerry James wrote: > With SBCL 1.0.38, on an x86_64 Fedora 13 machine: > > * (read-from-string "Is it nil or t?" :start 6 :end 9) > > IS > 3 > *snip* > > I expected that to mean that only the characters between :start and > :end would be examined. Yet GCL 2.6.8pre, ECL 10.4.1, and Clisp 2.47 > all behave the same way on this machine, so ... what am I missing? You're missing the wonderfully nonintuitive interaction between &OPTIONAL and &KEY. In your call, :START is taken as the value of ERROR-P, and 6 as the value of EOF-ERROR. Try this instead: (read-from-string "Is it nil or t?" t nil :start 6 :end 9) -- Brian Mastenbrook br...@ma... http://brian.mastenbrook.net/ |