comp.lang.ada
 help / color / mirror / Atom feed
From: "Nasser M. Abbasi" <nma@12000.org>
Subject: Re: ada question
Date: Thu, 31 Mar 2011 18:33:14 -0700
Date: 2011-03-31T18:33:14-07:00	[thread overview]
Message-ID: <in3a0s$9a0$1@speranza.aioe.org> (raw)
In-Reply-To: 828611a2-09fb-49db-8de1-2bcbe6c875e7@z3g2000prz.googlegroups.com

On 3/31/2011 4:40 PM, Robin wrote:
> how can you output an integer in ada without trailing new lines? it is
> kinda hard to figure out. HEy thanks and fix probs.

Do you mean the extra space BEFORE the integer?

I did small example, and do not see an extra newline, but
see extra space only.

-------------------
with ada.text_io; use ada.text_io;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure t is
A: constant array (1..4) of integer  :=(2,3,4,5);
begin
   for i in A'range loop
       put(integer'image(A(i)));
       new_line;
   end loop;

   for i in A'range loop
       put(A(i));
       new_line;
   end loop;
end t;
---------------------------

When I run the above, I get:
---------------------------
  2
  3
  4
  5
           2
           3
           4
           5
$
-----------------------

Is this what you mean?

--Nasser



  reply	other threads:[~2011-04-01  1:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 23:40 ada question Robin
2011-04-01  1:33 ` Nasser M. Abbasi [this message]
2011-04-01  6:16 ` Simon Wright
  -- strict thread matches above, loose matches on Subject: below --
2000-09-11  9:21 Ada question version_x
2000-09-11 12:44 ` Ted Dennison
2000-09-11 13:13   ` version_x
1996-12-10  0:00 Ada Question William Gilreath
1996-12-11  0:00 ` Kirk Beitz
1996-12-13  0:00   ` MIROLO Sebastien
1996-12-14  0:00     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox