foo.adb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. -- Copyright 2017-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;
  16. use Pck;
  17. use Pck.Middle;
  18. use Pck.Top;
  19. use Pck.Dyn_Middle;
  20. use Pck.Dyn_Top;
  21. procedure Foo is
  22. B : Bottom_T;
  23. M : Middle_T;
  24. DM : Dyn_Middle_T (24);
  25. DMA : Dyn_Middle_A := new Dyn_Middle_T (24);
  26. begin
  27. Assign (Top_T (B), 12);
  28. Assign (B, 10.0);
  29. Assign (M, 'V');
  30. Assign (B, 5.0);
  31. Assign (Dyn_Top_T (DM), 12);
  32. Assign (DM, 'V');
  33. Do_Nothing(DMA'Address); -- STOP
  34. end Foo;