问题
I am trying to print an integer in Ada83 .All the web sites have the info regarding Ada95 way of printing i.e Integer_Text_IO.Put (C); but this does not get compiled in Ada83. How Do I print an Integer in Ada83(Its a course requirement )?
回答1:
Integer_Text_IO
is an instantiation of Integer_IO
, provided in the standard library in Ada 95.
In Ada 83, the generic package Integer_IO
exists; you just have to instantiate it yourself.
(You can also use Integer'Image
, but that adds an annoying leading space for non-negative values.)
(I'm not going to show code because you say it's a school assignment.)
来源:https://stackoverflow.com/questions/23257846/print-an-integer-in-ada83only-not-ada95