0
我试图使用Ada来打印从自然派生的类;但是,我不断收到错误,prefix of "image" attribute must be a type
。 Google显然对这个错误一无所知。Ada:“图像”属性的前缀必须是一个类型
这里是产生这种错误的简化代码:我Layout
包
with Ada.Text_IO;
use Ada.Text_IO;
with Layout; use Layout;
procedure temptest is
term : Terminator_ID;
begin
term := Layout.Block_GetOpposite (1, Layout.REVERSED);
Put_Line (Item => term'Image);
end temptest;
这里是Terminator_ID
定义:type Terminator_ID is new Natural range 1 .. 40;
是什么原因造成这个错误,什么是正确的适当方法它?
错误信息告诉你的究竟是什么。 –
我被/写在问题中。 – weberc2
对不起,我在我以前的评论中意外地遗漏了一个词。我的意思是写“哪个*正是错误信息告诉你的”。 –