Example From UVA ADEPTUVA Package Declaration
TYPE Handshake IS (Removed, Acked, Released, Present);
TYPE Token_Fields IS (Status, Tag1, Tag2, Tag3, Index, Act_Time, Color);
ARRAY(Token_Fields RANGE Tag1 TO Act_Time) OF INTEGER;
TYPE Token_Vector IS ARRAY (Integer RANGE <> ) OF Token;
FUNCTION Protocol (Input : Token_Vector) RETURN Token;
SUBTYPE Token_Res IS Protocol Token;
CONSTANT Def_Colors : Color_Type := (OTHERS=ɬ);
CONSTANT Def_Source_Token : Token := (Released,Def_Colors);
CONSTANT Def_Sink_Token : Token := (Removed,Def_Colors);
-- Package declaration continued on next slide
Notes:
The package declaration required for this example is shown here. Several required data types and useful constants are declared. Note, for example, that the token type is a record that contains an enumerated type and an array of integers.