问题描述
我试图在Ada83中打印一个整数。所有网站都提供有关Ada95打印方式的信息,即Integer_Text_IO.Put(C);但这不会在Ada83中进行编译。如何在Ada83中打印整数(其课程要求)?
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 )?
推荐答案
Integer_Text_IO
是 Integer_IO的实例化
,在Ada 95的标准库中提供。
Integer_Text_IO
is an instantiation of Integer_IO
, provided in the standard library in Ada 95.
在Ada 83中,通用软件包 Integer_IO
存在;
In Ada 83, the generic package Integer_IO
exists; you just have to instantiate it yourself.
(您也可以使用 Integer'Image
,但这会增加一个烦人的问题。
(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.)
这篇关于在ada83中打印一个整数(仅)不是Ada95的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!