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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b6f13b7fb626a805 X-Google-Attributes: gid103376,public From: "Pat Rogers" Subject: Re: output something on the right side Date: 2000/10/21 Message-ID: #1/1 X-Deja-AN: 684305948 References: <39ee03b7@alijku02.edvz.uni-linz.ac.at> <8ss997$6je$1@nnrp1.deja.com> <5OoI5.5432$E85.90720@news1.sttls1.wa.home.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 X-Complaints-To: abuse@swbell.net X-Trace: nnrp1.sbc.net 972177271 208.191.184.67 (Sat, 21 Oct 2000 20:14:31 CDT) Organization: SBC Internet Services X-MSMail-Priority: Normal NNTP-Posting-Date: Sat, 21 Oct 2000 20:14:31 CDT Newsgroups: comp.lang.ada Date: 2000-10-21T00:00:00+00:00 List-Id: "DuckE" wrote in message news:5OoI5.5432$E85.90720@news1.sttls1.wa.home.com... > > "Robert Dewar" wrote in message news:8ss997 > [snip] > > Pascal had a smiley there, but in fact his answer is reasonable > > if you rewrite it slightly as > > > > Put (((80-s'Length)*' ') & s); > > > > Not enough people are familiar with the useful routines > > in the Ada.Strings.xxx packages :-) > > > > I get a compile error with the above code. I have a lot better luck with: > > Put (String'(1..(80-s'Length)=>' ') & s); Did you have the operator directly visible from Ada.Strings.Fixed? with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Fixed; use Ada.Strings.Fixed; procedure test is S : constant String := "Hello"; begin put_line( ((80-S'Length)*' ') & S ); end test;