From: Kenneth Wolcott <kennethwolcott@gmail.com>
Subject: When using the Ada Big_Numbers.Big_Integers package, can the To_String function output be sliced?
Date: Wed, 26 Jul 2023 22:26:24 -0700 (PDT) [thread overview]
Message-ID: <b5e3d389-0bb0-41ac-8a47-6110a5b62d67n@googlegroups.com> (raw)
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
next reply other threads:[~2023-07-27 5:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 5:26 Kenneth Wolcott [this message]
2023-07-27 8:53 ` When using the Ada Big_Numbers.Big_Integers package, can the To_String function output be sliced? 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
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