From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!wn11feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: BASIC_NUM_IO Reply-To: anon@anon.org (anon) References: <78hfulF1m321pU2@mid.individual.net> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Mon, 01 Jun 2009 08:18:28 GMT NNTP-Posting-Host: 12.64.198.224 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1243844308 12.64.198.224 (Mon, 01 Jun 2009 08:18:28 GMT) NNTP-Posting-Date: Mon, 01 Jun 2009 08:18:28 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:6156 Date: 2009-06-01T08:18:28+00:00 List-Id: "Ada.Integer_Text_IO" is the standard package that most use for integer I/O with Ada.Text_IO ; -- use for "new_line" use Ada.Text_IO ; with Ada.Integer_Text_IO ; -- use for integer "put" use Ada.Integer_Text_IO ; procedure test_ranges is begin put ( short_integer'size ) ; new_line ; end test_ranges ; If you want to define your own type of integer then with Ada.Text_IO ; -- use for new_line use Ada.Text_IO ; procedure test_ranges is package basic_num_io is new Ada.Text_IO.Integer_IO ( Integer ) ; use basic_num_io ; begin put ( short_integer'size ) ; new_line ; end test_ranges ; In <78hfulF1m321pU2@mid.individual.net>, Georg writes: >Hi All, > >in my Ada books I find the with-clause "with BASIC_NUM_IO; use >BASIC_NUM_IO". > >The following program > >with basic_num_io; use basic_num_io; > >procedure test_ranges is >begin > put_line(short_integer'size); >end test_ranges; > >does not compile because the compiler complaints that the package >"basic_num_io" does not exist. > >Is there a replacement for this package in GNAT? How can I print number >on the screen instead? > >Regards > >Georg