* xyzzy lisp : format ~R
- 整数を任意の基数で表現。英単語で表現。ローマ数字で表現。
- パラメータは最大5つ
- 基数
- 最小桁(幅)
- 足りない空きを埋める文字
- 区切りに使う文字
- 区切りを入れる間隔
- 基数が与えられた場合
- ":R" カンマ区切り
- "@R" 常に符号付き
- ":@R" 上記の組み合わせ
- 基数が与えられなかった場合
- "R" 英単語
- ":R" 英単語(序数)
- "@R" モダンローマ数字
- ":@R" 旧ローマ数字
(format nil "~10,10,'*,'-,2:R" 12345) "***1-23-45" (format nil "~R" 12345) "twelve thousand, three hundred and forty-five" (format nil "~:R" 12345) "twelve thousand, three hundred and forty-fifth" (format nil "~@R" 1234) "MCCXXXIV" (format nil "~:@R" 1234) "MCCXXXIIII"
update : 2006-10-04 (Wed) 22:28:58