我正在学习阿达并正在使用这本书Rendez-vous with Ada by Naiditch (1995).在页面上385,给出了包含不完整类型声明的包规范文件的示例:
package Restaurant_Linked_List is
subtype Name_Type is String (1..20);
type Restaurant_Record is private;
procedure Add_To_List (New_Entry: in Restaurant_Record);
procedure Get (New_Restaurant: out Restaurant_Record);
procedure Delete_From_List (Target: in Name_Type);
procedure Search_List (Target: in Name_Type);
procedure Output_List;
private
type Ethnicity is (Chinese, Japanese, French, Korean, Mexican, Italian, Jewish, American, German);
subtype Price_Type is Float range 0.0 .. 150.0;
type Restaurant_Record; -- incomplete type declaration
type Restaurant_Pointer is access Restaurant_Record;
type Restaurant_Record is -- …Run Code Online (Sandbox Code Playgroud)