Change in printing of Scheme values

Per Bothner per@bothner.com
Tue Nov 14 15:11:00 GMT 2006


BLewis wrote:
> If chars get treated the way strings are, it won't break existing code
> that I know of.  But (display 2) (display #\:) (display 3) would break.

That works as you presumably want:

#|kawa:1|# (display 2) (display #\:) (display 3)
2:3

> Here's a situation where you might want to jam numbers together: check
> digits.  We actually deal with a vendor who always sends six-digit SEDOL
> numbers, omitting the seventh check digit.  Code that displays the valid
> seven-digit SEDOL might display two numbers jammed together.  I'm sure
> there are other situations where code might display a base number jammed
> together with its check digit(s).

For something like that you really should be using format.  Can the
SEDOL number start with a 0?  In that case you can't use display anyway.
Some formats have two check digits.  (For example Norwegian "person
numbers" - like social security numbers.)  If the first one can be zero,
then you can't write the check digits using display, since then you'd
only get a single check digit.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/



More information about the Kawa mailing list