-- $Source: /commtar/monoBANK/CICS_INTF/sum.ada,v $ -- $Revision: 1.2 $ $Date: 88/02/29 20:34:49 $ $Author: chris $ generic type Field_Enum is (<>); type Field_Lens is array(Field_Enum) of Integer; function Sum_Lens(Lens : Field_Lens) return Integer; function Sum_Lens(Lens : Field_Lens) return Integer is Field : Field_Enum; Sum : Integer := 12; -- 12 bytes of overhead to start begin for F in Field_Enum loop Sum := Sum + Lens(F) + 3; -- add 1 for attribute byte and 2 for -- length end loop; return Sum; end Sum_Lens; -- $Cprt start$ -- -- Copyright (C) 1988 by Intermetrics, Inc. -- -- This material may be used duplicated or disclosed by or for the -- U.S. Government pursuant to the copyright license under DAR clause -- 7-104.9(a) (May 1981). -- -- This project was spnsored by the STARS Foundation -- Naval Research Laboratory, Washington DC -- -- $Cprt end$