This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Change in printing of Scheme values


You are right that SEDOLs can start with a zero.  Still, even if I try
the CVS version and find that my code doesn't break from it, I'm left
with the uneasy feeling that someone is going to be bitten by this
incompatibility sooner or later.

-----Original Message-----
From: Per Bothner [mailto:per@bothner.com] 
Sent: Tuesday, November 14, 2006 10:13 AM
To: BLewis
Cc: kawa@sourceware.org
Subject: Re: Change in printing of Scheme values

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]