一般的なレコードの定義に問題があります。
-- 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;
これをコンパイルすると、次のエラーが発生します(で-- 1 --
):
ジェネリック型の定義ではレコードは許可されていません