print an integer in ada83(Only) Not Ada95

不羁的心 提交于 2019-12-25 12:11:11

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!