2009年5月9日土曜日

readtable-case

CommonLispはデフォルトで読み込み時にシンボルを大文字にしますが,readtable-caseを用いて挙動を変更できます.
(setf (readtable-case *readtable*) case-sensitivity-mode)
case-sensitivity-modeには :upcase, :downcase, :preserve, :invertの4種類を設定できるようです.
:invertは大文字と小文字を入れ替えるらしいですが,大文字と小文字が混在するシンボルだとpreserveと違いがないようです.

0 件のコメント:

コメントを投稿