开发者

"Missing full declaration for private type.." in Ada

开发者 https://www.devze.com 2022-12-12 17:23 出处:网络
I\'m having a problem using a package ADS file in Ada. I\'m getting an error of \"Missing full declaration for private type LETTER\".

I'm having a problem using a package ADS file in Ada. I'm getting an error of "Missing full declaration for private type LETTER". How do I deal with it?

this is the code I wrote:

package LETTER_SPEC is

type LETTER is private;

procedure DATE_OF_LETTER (THE_LETTER: in out LETTER; DATE: STRING);

procedure RECIPIENT_NAME (THE_LETTER: 开发者_如何学编程in out LETTER; NAME: STRING);

procedure SUBJECT_LINE (THE_LETTER: in out LETTER; SUBJECT: STRING);

procedure TEXT_OF_LETTER (THE_LETTER: in out LETTER; TEXT: STRING);

procedure SENDER_NAME (THE_LETTER: in out LETTER; NAME: STRING);

procedure PUT_LETTER (THE_LETTER: in LETTER);

private

type PTR_LETTER is access STRING;

type LETTER_DATA is

   record

      DATE_OF_LETTER: PTR_LETTER;

       RECIPIENT_NAME: PTR_LETTER;

      SUBJECT_LINE: PTR_LETTER;

       TEXT_OF_LETTER: PTR_LETTER;

       SENDER_NAME: PTR_LETTER;

   end record;

end LETTER_SPEC;'

Thanks in advance..


Ada complains because you declare in the private part a LETTER_DATA type and not a LETTER type.

0

精彩评论

暂无评论...
验证码 换一张
取 消