comp.lang.ada
 help / color / mirror / Atom feed
* When using the Ada Big_Numbers.Big_Integers package, can the To_String function output be sliced?
@ 2023-07-27  5:26 Kenneth Wolcott
  2023-07-27  8:53 ` Jeffrey R.Carter
  0 siblings, 1 reply; 11+ messages in thread
From: Kenneth Wolcott @ 2023-07-27  5:26 UTC (permalink / 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

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

end of thread, other threads:[~2023-07-31 19:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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