pck.adb 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. package body Pck is
  16. function Get_Val (Seed: Integer; Off_By_One: Boolean) return Integer is
  17. Result : Integer := Seed;
  18. begin
  19. if Off_By_One then -- START
  20. Result := Result - 1;
  21. end if;
  22. Result := Result * 8;
  23. if Off_By_One then
  24. Result := Result + 1;
  25. end if;
  26. return Result;
  27. end Get_Val;
  28. procedure Do_Nothing (Val: in out Integer) is
  29. begin
  30. null;
  31. end Do_Nothing;
  32. procedure Call_Me is
  33. begin
  34. null;
  35. end Call_Me;
  36. procedure Increment (Val : in out Integer) is
  37. begin
  38. Val := Val + 1;
  39. end Increment;
  40. end Pck;