source: rtems/c/src/ada-tests/support/address_io.adb @ 8fbe2e6

4.115
Last change on this file since 8fbe2e6 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 875 bytes
Line 
1--
2--  Address_IO / Specification
3--
4--  DESCRIPTION:
5--
6--  This package instantiates the IO routines necessary to
7--  perform IO on data of the type System.Address.
8--
9--  DEPENDENCIES:
10--
11-- 
12--
13--  COPYRIGHT (c) 1989-2009.
14--  On-Line Applications Research Corporation (OAR).
15--
16--  The license and distribution terms for this file may in
17--  the file LICENSE in this distribution or at
18--  http://www.rtems.org/license/LICENSE.
19--
20
21with System.Storage_Elements;
22with Text_IO;
23
24package body Address_IO is
25
26   procedure Put (
27      Item  : in     System.Address;
28      Width : in     Natural := 8;
29      Base  : in     Natural := 16
30   ) is
31     package Integer_IO is new TEXT_IO.Integer_IO( Integer );
32   begin
33
34      Integer_IO.Put(
35         Integer( System.Storage_Elements.To_Integer( Item ) ),
36         Width,
37         Base
38      );
39
40   end Put;
41
42end Address_IO;
43
Note: See TracBrowser for help on using the repository browser.