comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com (Tom Moran)
Subject: Re: ada help please
Date: 1999/01/26
Date: 1999-01-26T00:00:00+00:00	[thread overview]
Message-ID: <36ad2d46.24886495@news.pacbell.net> (raw)
In-Reply-To: 36ab9c3f.2963059@news.ptd.net

>you cant add two characters and you cant typecast them to integers, so
>how
>do u get the result of the sums into Z?
  The old IBM 1620 did this with an addition table.  ie, make two,
two-dimensional arrays (one for "with carry", one without) indexed by
the characters '0' .. '9' to give the sum character.  Initialize these
constant arrays yourself from any 1st grade arithmetic text.  You'll
also need similar arrays of Boolean to tell if you should generate a
carry.
  Just one approach. ;)  




  parent reply	other threads:[~1999-01-26  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <36ab9c3f.2963059@news.ptd.net>
1999-01-25  0:00 ` ada help please Anthony E. Glover
1999-01-26  0:00 ` Tom Moran [this message]
1999-02-01  0:00   ` Robert I. Eachus
1999-02-01  0:00 ` Nick Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox