ファイルを読んでみる 初めての人のためのLISP P.238

Cドライブ直下にある、こんなファイル
C:\setup.log

[InstallShield Silent]
Version=v7.00
File=Log File
[ResponseResult]
ResultCode=0

これをLispで読んでみる

CL-USER> (setf s (open "c:\setup.log" :direction :input))
#<INPUT BUFFERED FILE-STREAM CHARACTER #P"C:setup.log" @1>
CL-USER> (read s)
[INSTALLSHIELD
CL-USER> (read s)
SILENT]
CL-USER> (read s)
VERSION=V7.00
CL-USER> (read s)
FILE=LOG
CL-USER> (read s)
FILE
CL-USER> (read s)
[RESPONSERESULT]
CL-USER> (read s)
RESULTCODE=0
CL-USER> (close s)
T
CL-USER> 

意外とすんなり読める。
大抵こーゆーパターンって、windowsのパス指定を受付なかったり
するんだけど行けた。

しっかし、小文字が大文字になんねんなぁ。。。