summaryrefslogtreecommitdiffstats
path: root/testsuites/ada/support/address_io.adb
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/ada/support/address_io.adb')
-rw-r--r--testsuites/ada/support/address_io.adb43
1 files changed, 43 insertions, 0 deletions
diff --git a/testsuites/ada/support/address_io.adb b/testsuites/ada/support/address_io.adb
new file mode 100644
index 0000000000..f549f57ffe
--- /dev/null
+++ b/testsuites/ada/support/address_io.adb
@@ -0,0 +1,43 @@
+--
+-- Address_IO / Specification
+--
+-- DESCRIPTION:
+--
+-- This package instantiates the IO routines necessary to
+-- perform IO on data of the type System.Address.
+--
+-- DEPENDENCIES:
+--
+--
+--
+-- COPYRIGHT (c) 1989-2009.
+-- On-Line Applications Research Corporation (OAR).
+--
+-- The license and distribution terms for this file may in
+-- the file LICENSE in this distribution or at
+-- http://www.rtems.org/license/LICENSE.
+--
+
+with System.Storage_Elements;
+with Text_IO;
+
+package body Address_IO is
+
+ procedure Put (
+ Item : in System.Address;
+ Width : in Natural := 8;
+ Base : in Natural := 16
+ ) is
+ package Integer_IO is new TEXT_IO.Integer_IO( Integer );
+ begin
+
+ Integer_IO.Put(
+ Integer( System.Storage_Elements.To_Integer( Item ) ),
+ Width,
+ Base
+ );
+
+ end Put;
+
+end Address_IO;
+