with text_io; use text_io; procedure MaxKer is -- elso valtozat type IVektor is array ( 1..10 ) of INTEGER; iv: IVektor; -- masodik valtozat type Ind is new INTEGER range 1..10; type InVektor is array (Ind) of INTEGER; inv: InVektor := (5,3,6,3,7,2,8,8,5,1); -- harmadik valtozat type Index is new INTEGER; type IntVektor is array ( Index range <> ) of INTEGER; intv: IntVektor(1..10) := (3=>0,4..6=>9,8=>13,7|9=>4,1|2|10=>2); -- egyeb deklaracios lehetosegek v0: IntVektor(1..10) := (1,2,3,4,5,6,7,8,9,10); v1: IntVektor(1..10) := (2,6,others=>4); v2: IntVektor(1..10) := (7|9=>4,others=>2); -- csak Ada95-ben v3: IntVektor := (1,2,3,4,5,6,7,8,9,10); -- csak Ada95-ben subtype SIntVektor is IntVektor(1..10); sv: SIntVektor; function MaxHely ( v: IntVektor ) return Index is mh: Index := v'First; begin for i in v'range loop if v(mh) < v(i) then mh := i; end if; end loop; return mh; end MaxHely; begin Put_Line("A maximum: " & integer'image(intv(MaxHely(intv)))); end MaxKer;