pa.adb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. -- Copyright 2005-2022 Free Software Foundation, Inc.
  2. --
  3. -- This program is free software; you can redistribute it and/or modify
  4. -- it under the terms of the GNU General Public License as published by
  5. -- the Free Software Foundation; either version 3 of the License, or
  6. -- (at your option) any later version.
  7. --
  8. -- This program is distributed in the hope that it will be useful,
  9. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. -- GNU General Public License for more details.
  12. --
  13. -- You should have received a copy of the GNU General Public License
  14. -- along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. with Pck; use Pck;
  16. procedure PA is
  17. type Packed_Array is array (4 .. 8) of Boolean;
  18. pragma pack (Packed_Array);
  19. Var : Packed_Array;
  20. -- Unconstrained packed array (bounds are dynamic).
  21. type Unconstrained_Packed_Array is array (Integer range <>) of Boolean;
  22. U_Var : Unconstrained_Packed_Array (1 .. Ident (6));
  23. begin
  24. Var := (True, False, True, False, True);
  25. U_Var := (True, False, False, True, True, False);
  26. Var (8) := False; -- STOP
  27. U_Var (U_Var'Last) := True;
  28. end PA;