From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ad4:4b2d:0:b0:636:3fbd:84e with SMTP id s13-20020ad44b2d000000b006363fbd084emr13102qvw.5.1690601395599; Fri, 28 Jul 2023 20:29:55 -0700 (PDT) X-Received: by 2002:a05:6870:b7b3:b0:1bb:6e8a:d24e with SMTP id ed51-20020a056870b7b300b001bb6e8ad24emr5341553oab.4.1690601395236; Fri, 28 Jul 2023 20:29:55 -0700 (PDT) Path: eternal-september.org!news.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 28 Jul 2023 20:29:54 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=98.59.238.112; posting-account=oHOvdQoAAACYgyEBjgPNvKFOGxg8pNns NNTP-Posting-Host: 98.59.238.112 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: When using the Ada Big_Numbers.Big_Integers package, can the To_String function output be sliced? From: Kenneth Wolcott Injection-Date: Sat, 29 Jul 2023 03:29:55 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:65463 List-Id: On Friday, July 28, 2023 at 11:21:13=E2=80=AFAM UTC-7, Simon Wright wrote: > This works for me: > for I in 1 .. Max loop=20 > Powers_of_2 :=3D Powers_of_2 * To_Big_Integer (2);=20 > if I >=3D 4 then > if To_String (Powers_Of_2)(2 .. 3) =3D "12" then > Put ("2^");=20 > Put (I, 0);=20 > Put_Line (To_String (Powers_of_2));=20 > end if; > end if;=20 > end loop; Thanks to all for your responses... I don't know exactly what I had tried that had failed, but I have learned m= ore now, especially to be more observant. I was able to simplify my code. Greatly appreciate your patience with me. Thanks, Ken