comp.lang.ada
 help / color / mirror / Atom feed
* Prepend unsigned integer 32 number
@ 2005-04-11 13:23 jayson.prichard
  2005-04-12  2:03 ` Steve
  2005-04-13  1:02 ` Stephen Leake
  0 siblings, 2 replies; 3+ messages in thread
From: jayson.prichard @ 2005-04-11 13:23 UTC (permalink / raw)


I am looking for a quick, clean method to pre-prend an unsigned integer
32 number with another number; then reverse it.  The resulting number
will be stored, not printed to the screen.

For example:
Original number  =  2200
Prepended number = 12200

Any ideas?




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Prepend unsigned integer 32 number
  2005-04-11 13:23 Prepend unsigned integer 32 number jayson.prichard
@ 2005-04-12  2:03 ` Steve
  2005-04-13  1:02 ` Stephen Leake
  1 sibling, 0 replies; 3+ messages in thread
From: Steve @ 2005-04-12  2:03 UTC (permalink / raw)


I'm having a bit of trouble understanding the question.
"pre-pend" presumably means to put in front of

The unsigned intger 32 number tells me that you want to put a 32 bit number 
in front of some other number, although I don't know what representation 
that other number is in.

Hmmm... the number is to be stored, not printed... could be binary... still 
scratching my head.

Oh good... an example.

Original number 2200, Prepended number 12200

Hmmm... my first thought was: 12200 is being prepended ot 2200.

Wait! I see, a 1 is being prepended to 2200 to give 12200.

Perhaps you're just looking for a string.

Sounds like a homework question.

Is it?

Steve
(The Duck)

<jayson.prichard@ngc.com> wrote in message 
news:1113225780.839999.151850@o13g2000cwo.googlegroups.com...
>I am looking for a quick, clean method to pre-prend an unsigned integer
> 32 number with another number; then reverse it.  The resulting number
> will be stored, not printed to the screen.
>
> For example:
> Original number  =  2200
> Prepended number = 12200
>
> Any ideas?
> 





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Prepend unsigned integer 32 number
  2005-04-11 13:23 Prepend unsigned integer 32 number jayson.prichard
  2005-04-12  2:03 ` Steve
@ 2005-04-13  1:02 ` Stephen Leake
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Leake @ 2005-04-13  1:02 UTC (permalink / raw)
  To: jayson.prichard; +Cc: comp.lang.ada

jayson.prichard@ngc.com writes:

> I am looking for a quick, clean method to pre-prend an unsigned integer
> 32 number with another number; then reverse it.  The resulting number
> will be stored, not printed to the screen.
>
> For example:
> Original number  =  2200
> Prepended number = 12200

Prepended_Number := Original_Number + 10_000;

>
>
> Any ideas?
>
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada-france.org
> http://www.ada-france.org/mailman/listinfo/comp.lang.ada
>
>

-- 
-- Stephe




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-13  1:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-11 13:23 Prepend unsigned integer 32 number jayson.prichard
2005-04-12  2:03 ` Steve
2005-04-13  1:02 ` Stephen Leake

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