Controlling width of strings during Put operation?

From: Peter C. Chapin (pchapin_at_sover.net)
Date: 12/29/03


Date: Mon, 29 Dec 2003 02:57:40 GMT


Hello!

I'm trying to print out a nice table of results using the standard IO
packages. I can print the table rows fairly nicely. I see that the Put
procedure in Integer_IO takes a Width parameter that is defaulted to
Num'Width (Num being the type used to instantiate Integer_IO). That is
fine. In fact, it's good.

My issue is: how do I best print the table headers? I could certainly
play around with spaces until I got good looking results but that seems
fragile and inelegant. I'd rather set a field width for each header
based on the Num'Width of the numeric type in the column below that
header. That way if I change the type of one of the columns, the headers
have a prayer of still lining up without me fiddling with them again. My
problem is that I don't see a Put procedure that allows me to specify a
field width when I print a string. Do I have to "manually" prepare my
own header strings with the appropriate number of padding spaces? Is
there an easy way to do that?

Thanks!

Peter



Relevant Pages

  • mirror trouble
    ... I'm trying to mirror sarge and etch, i386, main contrib non-free. ... Bad header line ... Ign http://log.slsware.dmz etch Release.gpg ... Ign http://log.slsware.dmz etch/non-free Packages ...
    (Debian-User)
  • Re: php-mbstring-4.3.8-2.1
    ... After downloading the headers for the packages my system needs, ... the package header files for the complete Fedora distribution. ...
    (Fedora)
  • Re: php-mbstring-4.3.8-2.1
    ... > After downloading the headers for the packages my system needs, ... > select the packages I want to update and click forward. ... > the package header files for the complete Fedora distribution. ... You should not have an SMP kernel, ...
    (Fedora)
  • Re: Still having up2date problems (and yum too)
    ... > system with either yum or up2date. ... > I resolved the header message by following the advice given on this list ... > The following packages were added to your selection to satisfy ... > Resolving dependencies ...
    (Fedora)
  • Still having up2date problems (and yum too)
    ... I am having problems trying to update the packages on my FC2 x86_64 ... system with either yum or up2date. ... I resolved the header message by following the advice given on this list ... [root@Linux64 law]# yum update ...
    (Fedora)