Mar*_*ann 1 format common-lisp roman-numerals
我想打印几个数字作为罗马数字但是
(format t "~@R~%" 4000)
Run Code Online (Sandbox Code Playgroud)
导致SBCL 1.3.20中的以下错误以及使用ccl的类似错误:
Number too large to print in Roman numerals: 4,000
[Condition of type SIMPLE-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] abort thread (#<THREAD "new-repl-thread" RUNNING {100503D2B3}>)
Run Code Online (Sandbox Code Playgroud)
我没有在Hyperspec中找到有关此限制的任何信息,也不知道罗马人的数字只有3,999.
是否有现成的解决方案可以打印大于3,999的罗马数字?