comp.lang.ada
 help / color / mirror / Atom feed
From: Kenneth Wolcott <kennethwolcott@gmail.com>
Subject: Re: When using the Ada Big_Numbers.Big_Integers package, can the To_String function output be sliced?
Date: Fri, 28 Jul 2023 20:29:54 -0700 (PDT)	[thread overview]
Message-ID: <e20dc905-4f1d-4224-b06a-24f4adcc8acbn@googlegroups.com> (raw)
In-Reply-To: <lycz0baodn.fsf@pushface.org>

On Friday, July 28, 2023 at 11:21:13 AM UTC-7, Simon Wright wrote:
> This works for me:
> for I in 1 .. Max loop 
> Powers_of_2 := Powers_of_2 * To_Big_Integer (2); 
> if I >= 4 then
> if To_String (Powers_Of_2)(2 .. 3) = "12" then
> Put ("2^"); 
> Put (I, 0); 
> Put_Line (To_String (Powers_of_2)); 
> end if;
> end if; 
> end loop;


Thanks to all for your responses...

I don't know exactly what I had tried that had failed, but I have learned more now, especially to be more observant.

I was able to simplify my code.

Greatly appreciate your patience with me.

Thanks,
Ken

  reply	other threads:[~2023-07-29  3:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27  5:26 When using the Ada Big_Numbers.Big_Integers package, can the To_String function output be sliced? Kenneth Wolcott
2023-07-27  8:53 ` Jeffrey R.Carter
2023-07-27 22:47   ` Kenneth Wolcott
2023-07-28 17:19     ` AdaMagica
2023-07-28 18:21     ` Simon Wright
2023-07-29  3:29       ` Kenneth Wolcott [this message]
2023-07-29 11:07       ` AdaMagica
2023-07-29 23:49         ` Kenneth Wolcott
2023-07-29 23:53           ` Kenneth Wolcott
2023-07-30  4:43             ` Randy Brukardt
2023-07-31 19:36               ` Kenneth Wolcott
replies disabled

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