comp.lang.ada
 help / color / mirror / Atom feed
From: Darel Cullen <Darel@djcull.demon.co.uk>
Subject: Re: formatting numbers on output
Date: 1996/08/18
Date: 1996-08-18T00:00:00+00:00	[thread overview]
Message-ID: <j5VVdDAUalFyEwPH@djcull.demon.co.uk> (raw)
In-Reply-To: 4v2r77$lal@hermes.acs.unt.edu


In article <4v2r77$lal@hermes.acs.unt.edu>, "Ramesh S. Mantri"
<mantri@ponder.csci.unt.edu> writes
>Is formatting numbers on output possible in Ada, the way it is
>permitted in other languages such as Fortran, Pascal, C and others?
>Because it is displaying even small numbers in a large space. As a 
>result, the output does not look too good.
>Thanks in advance.
>--- Ramesh Mantri

Sure.. Check out the extra parameters WIDTH, BASE, AFT, EXP, on Text_io
for Integer_io and Float_io.. They are pretty self explaining. 
AFT and EXP relate to floating point numbers and positioning of the
point. WIDTH is what you are after , this specifies the size of field
to display your small numbers in.
more complicated screen formatting becomes a little complex in ada 83 at
any rate.. usually you end up having to output vt100 or ansi codes in
your Put statement to position the cursor on the screen.


-- 
Darel Cullen




      reply	other threads:[~1996-08-18  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-16  0:00 formatting numbers on output Ramesh S. Mantri
1996-08-18  0:00 ` Darel Cullen [this message]
replies disabled

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