我对通用记录的定义有些麻烦:
-- ADS File
package Stack is
-- (generic) Entry
generic type StackEntry is private;
-- An array of Entries (limited to 5 for testing)
type StackEntryHolder is array (0..5) of StackEntry;
-- Stack type containing the entries, it's max. size and the current position
type StatStack is
record -- 1 --
maxSize : Integer := 5; -- max size (see above)
pos : Integer := 0; -- current position
content : StackEntryHolder; -- content entries
end record;
-- functions / procedures
end Stack;
如果我编译它,我会收到以下错误(at -- 1 --
):
泛型类型定义中不允许记录