▁a ▁sub program ▁that ▁takes ▁one ▁or ▁more ▁generic ▁formal ▁parameters . ▁ ▁A ▁generic ▁formal ▁parameter ▁is ▁a ▁value , ▁a ▁variable , ▁a ▁constant , ▁a ▁type , ▁a ▁sub program , ▁or ▁even ▁an ▁instance ▁of ▁another , ▁designated , ▁generic ▁unit . ▁For ▁generic ▁formal ▁types , ▁the ▁syntax ▁distingu ishes ▁between ▁discrete , ▁floating - point , ▁fixed - point , ▁access ▁( pointer ) ▁types , ▁etc . ▁Some ▁formal ▁parameters ▁can ▁have ▁default ▁values . ▁ ▁To ▁instantiate ▁a ▁generic ▁unit , ▁the ▁programmer ▁passes ▁actual ▁parameters ▁for ▁each ▁formal . ▁The ▁generic ▁instance ▁then ▁behav es ▁just ▁like ▁any ▁other ▁unit . ▁It ▁is ▁possible ▁to ▁instantiate ▁generic ▁units ▁at ▁run - time , ▁for ▁example ▁inside ▁a ▁loop . ▁ ▁Example ▁ ▁The ▁specification ▁of ▁a ▁generic ▁package : ▁▁ ▁generic ▁▁▁▁ ▁Max _ Size ▁: ▁Natural ; ▁-- ▁a ▁generic ▁formal ▁value ▁▁▁▁ ▁type ▁Element _ Type ▁is ▁private ; ▁-- ▁a ▁generic ▁formal ▁type ; ▁accepts ▁any ▁non limited ▁type ▁ ▁package ▁Stack s ▁is ▁▁▁▁ ▁type ▁Size _ Type ▁is ▁range ▁ 0 ▁.. ▁Max _ Size ; ▁▁▁▁ ▁type ▁Stack ▁is ▁limited ▁private ; ▁▁▁▁ ▁procedure ▁Create ▁( S ▁: ▁out ▁Stack ; ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▁▁▁▁▁▁ ▁Initial _ Size ▁: ▁in ▁Size _ Type ▁:= ▁Max _ Size ); ▁▁▁▁ ▁procedure ▁P ush ▁( In to ▁: ▁in ▁out ▁Stack ; ▁Element ▁: ▁in ▁Element _ Type ); ▁▁▁▁ ▁procedure ▁Pop ▁( From ▁: ▁in ▁out ▁Stack ; ▁Element ▁: ▁out