4 ms·
There are several ways to do this. Put_Line (myNumber'Image); works just as well as Integer'Image. with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; P
by synack 5y ago
There are several ways to do this.
Put_Line (myNumber'Image);
works just as well as Integer'Image.
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
Put (myNumber);
Integer_Text_IO is included in the standard library. More info here: http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-A-10-8.html http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-A-10-8....
There's also a proposal to add format strings to the language: https://github.com/AdaCore/ada-spark-rfcs/pull/77 https://github.com/AdaCore/ada-spark-rfcs/pull/77
- deleted 5y ago[deleted]