【入門】Common Lisp その9【質問よろず】
■ このスレッドは過去ログ倉庫に格納されています
0892デフォルトの名無しさん
2013/01/29(火) 00:39:40.33マクロの勉強をしているんで、できればいいマクロでお願いします
(defun timestamp (country)
(multiple-value-bind (sec min hour day month year)
(get-decoded-time)
(let ((japanese-style (concatenate 'string (princ-to-string year) "/" (princ-to-string month) "/" (princ-to-string day)\
))
(american-style (concatenate 'string (princ-to-string month) "/" (princ-to-string day) "/" (princ-to-string year)\
))
(usage "(timestamp \"ja\") or (timestamp \"en\")"))
(cond ((equal country "ja")
japanese-style)
((equal country "en")
american-style)
(t
usage)))))
■ このスレッドは過去ログ倉庫に格納されています