From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: string operations
Date: 2000/11/20
Date: 2000-11-20T00:00:00+00:00 [thread overview]
Message-ID: <8vbfns$do2$1@nnrp1.deja.com> (raw)
In-Reply-To: WE7S5.239$rj6.8595@read2.inet.fi
In article <WE7S5.239$rj6.8595@read2.inet.fi>,
"Anders Wirzenius" <anders.wirzenius@pp.qnet.fi> wrote:
> To me the example would have been even more revealing if
> the Put statement had been written
> Put(Character'Val(Character'Pos ('0') + N mod 10));
Odd ... addition is after all commutative, can you explain why
in this case a+b is clearer than b+a
I personally prefer the form I had, because from an algorithmic
point of view it is N mod 10 that is important, and
the Character'Pos is a minor detail for keeping the types
right ...
Sent via Deja.com http://www.deja.com/
Before you buy.
next prev parent reply other threads:[~2000-11-20 0:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-18 0:00 string operations Margit Gut
2000-11-18 0:00 ` Jeff Carter
2000-11-19 0:00 ` Robert Dewar
2000-11-20 0:00 ` Anders Wirzenius
2000-11-20 0:00 ` Robert Dewar [this message]
2000-11-21 6:30 ` Anders Wirzenius
2000-11-24 0:00 ` Margit Gut
2000-11-24 0:00 ` Margit Gut
-- strict thread matches above, loose matches on Subject: below --
2000-11-24 0:00 String operations Margit Gut
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox