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=-0.0 required=3.0 tests=BAYES_40,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:622a:14c9:b0:403:f3f9:850d with SMTP id u9-20020a05622a14c900b00403f3f9850dmr8631qtx.3.1690435584872; Wed, 26 Jul 2023 22:26:24 -0700 (PDT) X-Received: by 2002:a05:6808:1a03:b0:3a4:a629:6017 with SMTP id bk3-20020a0568081a0300b003a4a6296017mr3758301oib.7.1690435584616; Wed, 26 Jul 2023 22:26:24 -0700 (PDT) Path: eternal-september.org!news.eternal-september.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 26 Jul 2023 22:26:24 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=98.59.238.112; posting-account=oHOvdQoAAACYgyEBjgPNvKFOGxg8pNns NNTP-Posting-Host: 98.59.238.112 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: When using the Ada Big_Numbers.Big_Integers package, can the To_String function output be sliced? From: Kenneth Wolcott Injection-Date: Thu, 27 Jul 2023 05:26:24 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1704 Xref: news.eternal-september.org comp.lang.ada:65457 List-Id: Hi; When using the Ada Big_Numbers.Big_Integers package, can the To_String function output be sliced? I'd like to slice out the first two digits from the output of the To_String function of Ada.Big_Numbers.Big_Integers. When trying to do the usual string slicing on the output I get a silent failure, it is just as if I typed the null statement. Do I have to save the output to a variable via a declare block in order to get the slice to work? This question is prompted by my attempt to solve the Rosetta Code task: https://rosettacode.org/wiki/First_power_of_2_that_has_leading_decimal_digits_of_12 Thanks, Ken Wolcott