-- FXAIB00.A -- -- Grant of Unlimited Rights -- -- The Ada Conformity Assessment Authority (ACAA) holds unlimited -- rights in the software and documentation contained herein. Unlimited -- rights are the same as those granted by the U.S. Government for older -- parts of the Ada Conformity Assessment Test Suite, and are defined -- in DFAR 252.227-7013(a)(19). By making this public release, the ACAA -- intends to confer upon all recipients unlimited rights equal to those -- held by the ACAA. These rights include rights to use, duplicate, -- release or disclose the released technical data and computer software -- in whole or in part, in any manner and for any purpose whatsoever, and -- to have or permit others to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE ACAA MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. -- -- Notice -- -- The ACAA has created and maintains the Ada Conformity Assessment Test -- Suite for the purpose of conformity assessments conducted in accordance -- with the International Standard ISO/IEC 18009 - Ada: Conformity -- assessment of a language processor. This test suite should not be used -- to make claims of conformance unless used in accordance with -- ISO/IEC 18009 and any applicable ACAA procedures. -- --* -- -- FOUNDATION DESCRIPTION: -- This package declares types and functions which represent map -- locations, both without and with unique ids. These types are used -- to check that containers are preelaborated. -- -- CHANGE HISTORY: -- 23 Dec 20 RLB Created foundation. -- --! package FXAIB00 with Preelaborate is type Location is record X, Y : Integer := 0; end record; -- This type has Preelaborable Initialization (see 10.2.1). function Get_Id return Natural; -- Return a different Id with each call. type Tagged_Location is record Id : Natural := Get_Id; Loc : Location; end record; -- This type does not have Preelaborable Initialization (see 10.2.1). end FXAIB00; package body FXAIB00 is Id_Generator : Natural := 0; function Get_Id return Natural is -- Return a different Id with each call. begin if Id_Generator > Natural'Last - 10 then -- Let the generator wrap. We use "mod 7" so the -- Ids stay unique as long as possible. Id_Generator := Id_Generator mod 7; end if; Id_Generator := Id_Generator + 7; return Id_Generator; end Get_Id; end FXAIB00;