OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [support/] [fxaca00.a] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- FXACA00.A
2
--
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making
9
--     this public release, the Government intends to confer upon all
10
--     recipients unlimited rights  equal to those held by the Government.
11
--     These rights include rights to use, duplicate, release or disclose the
12
--     released technical data and computer software in whole or in part, in
13
--     any manner and for any purpose whatsoever, and to have or permit others
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
--
26
-- FOUNDATION DESCRIPTION:
27
--      This foundation consists of type definitions and object declarations
28
--      used by tests of Stream_IO functionality.
29
--      Objects of both record types specified below (discriminated records
30
--      with defaults, and discriminated records w/o defaults that have the
31
--      discriminant included in a representation clause for the type) should
32
--      have their discriminants included in the stream when using 'Write
33
--      Likewise, discriminants should be extracted from the stream when
34
--      using 'Read.
35
--
36
-- CHANGE HISTORY:
37
--      06 Dec 94   SAIC    ACVC 2.0
38
--      02 May 96   SAIC    Incorporated reviewer comments for ACVC 2.1.
39
--
40
--!
41
 
42
with ImpDef;
43
 
44
package FXACA00 is
45
 
46
   type Origin_Type is (Foreign, Domestic);
47
 
48
   for Origin_Type'Size use 1;   -- Forces objects of the type to be
49
                                 -- representable in 1 bit, used in rep clause
50
                                 -- below for Sales_Record_Type.
51
 
52
   type Product_Type (Manufacture : Origin_Type := Domestic) is
53
      record
54
         Item : String (1..8);
55
         ID   : Natural range 1..100;
56
         case Manufacture is
57
            when Foreign  =>
58
               Importer : String (1..10);
59
            when Domestic =>
60
               Distributor : String (1..10);
61
         end case;
62
      end record;
63
 
64
 
65
   type Sales_Record_Type (Buyer : Origin_Type) is   -- No default provided
66
      record                                         -- for the discriminant.
67
         Name      : String (1..6);
68
         Sale_Item : Boolean := False;
69
         case Buyer is
70
            when Foreign  =>
71
               Quantity_Discount : Boolean;
72
            when Domestic =>
73
               Cash_Discount : Boolean;
74
         end case;
75
      end record;
76
 
77
 
78
   String_Bits : constant := ImpDef.Char_Bits * 6 - 1;
79
 
80
   -- This discriminated record type has a representation clause that
81
   -- includes the discriminant of the object of this type.
82
 
83
   for Sales_Record_Type use
84
      record
85
         Name              at 0 range 0..String_Bits;
86
         Sale_Item         at ImpDef.Next_Storage_Slot range 0..0;
87
         Buyer             at ImpDef.Next_Storage_Slot range 1..1;
88
         Quantity_Discount at ImpDef.Next_Storage_Slot range 2..2;
89
         Cash_Discount     at ImpDef.Next_Storage_Slot range 3..3;
90
      end record;
91
 
92
 
93
   type Timespan_Type is (Week, Month, Year);
94
 
95
   type Sales_Statistics_Type is
96
      array (Timespan_Type) of natural range 0 .. 500;
97
 
98
 
99
   -- Object Declarations
100
 
101
 
102
   Product_01 : Product_Type := (Domestic, "Product1", 1, "Distrib 01");
103
   Product_02 : Product_Type (Manufacture => Foreign) := (Foreign,
104
                                                          "Product2",
105
                                                          2,
106
                                                          "Importer02");
107
   Product_03 : Product_Type (Foreign) := (Manufacture => Foreign,
108
                                           Item        => "Product3",
109
                                           ID          => 3,
110
                                           Importer    => "Importer03");
111
   --
112
 
113
   Sale_Count_01 : Integer := 2;
114
   Sale_Count_02 : Integer := 0;
115
   Sale_Count_03 : Integer := 3;
116
 
117
   --
118
 
119
   Sale_Rec_01 : Sales_Record_Type (Domestic) :=
120
     (Domestic, "Buyer1", False, True);
121
   Sale_Rec_02 : Sales_Record_Type (Domestic) :=
122
     (Domestic, "Buyer2", True,  False);
123
 
124
   Sale_Rec_03 : Sales_Record_Type (Buyer => Foreign) :=
125
     (Buyer => Foreign, Name => "Buyer3", Sale_Item => True,
126
      Quantity_Discount => True);
127
 
128
   Sale_Rec_04 : Sales_Record_Type (Foreign) :=
129
     (Foreign, "Buyer4", True, False);
130
   Sale_Rec_05 : Sales_Record_Type (Buyer => Foreign) := (Foreign,
131
                                                          "Buyer5",
132
                                                          False,
133
                                                          False);
134
   --
135
 
136
 
137
   Product_01_Stats : Sales_Statistics_Type := (2,4,8);
138
   Product_02_Stats : Sales_Statistics_Type := (Week  =>  0,
139
                                                Month =>  5,
140
                                                Year  => 10);
141
   Product_03_Stats : Sales_Statistics_Type := (3, 6, others => 12);
142
 
143
 
144
end FXACA00;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.