How to use ~c with v parameter in (ice-9 format)?
Tomas Volf <[email protected]>
| Newsgroups | gmane.lisp.guile.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, when reading the documentation for (ice-9 format), this part of description of ~c caught my eye: > If the charnum parameter is given then an argument is not taken but > instead the character is (integer->char charnum) (see > Characters). This can be used for instance to output characters given > by their ASCII code. I wanted to give it a try, so I took the example from documentation and run it in a REPL. --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use (ice-9 format) scheme@(guile-user)> (format #f "~65c") ;;; <stdin>:29:0: warning: "~65c": wrong number of `format' arguments: expected 1, got 0 $7 = "A" --8<---------------cut here---------------end--------------->8--- So, it does indeed return "A", however is also prints a warning. Am I doing something wrong? Or is the documentation out-dated and `charnum' parameter should be used in a different way? Have a nice day, Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.
signature.asc
(application/pgp-signature, 853 B)
-----BEGIN PGP SIGNATURE----- iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmcxRBYOHH5Ad29sZnNk ZW4uY3oACgkQL7/ufbZ/wak2qg/+I2gSkS9kGJftujh4ll0xY3A22nOW1fD5xjUp XrShYuDwx73ShTtnHixgRnY4sxcaCwYaqOTnArs1K/W20zzkcefokU+Q5GYxdlDv nz+38QaKRXqUREMGCU3JnlDe68CACi3HKD+niNoYOXVmxYArziPGUVsBBxpmgSkm p/8opz1TwwMzIOl7Z8CwQwidj1onvyo1tKUKU9xUw4D931Z9wartvzXtzGv8uFq3 bt19Y7MLd9O2ISofoAJ4Q/SFQzG+ro1v0iy91agnDwrpt98h6dJgLco3FxWk21s4 4uCk5pnjkCqyYFu6+/6QdpMvb7+fulKnr27ISSG4SR+rpMILt+9Ud0cB7Kb/OkT4 wMxf0flTVI4YiCMOlely96LSEwZ5pT9yw/hot+ycIuoIToqkpFacf6a/sGUf06p6 j9Swgck7m7cHbMErgAZkQm3jqHPwOGp47xI+dkaO+yzzMW2JLJlEEy/IEAeShWK0 b4s5ZcmqvbBZQsCZpSmI93KBJqxGqkV3lyDf9kDcyi3URnbKXQs0V6VtMX74t8WX NgoDKFAz0Ew1Hq8Ug8CFWCIDqgAYWeGszXyEkkTbU/fV4e7T9b9flhqL2+vr+3y+ a2aciLCMjO7e4+oFJyZPTZoiKcAP/p1MmEGMqALcJL0BxaF6x02sw15dBA9hYcEl hE9nv5E= =mFGQ -----END PGP SIGNATURE-----