* output something on the right side
@ 2000-10-18 0:00 Paul
2000-10-18 0:00 ` tmoran
2000-10-19 0:00 ` Pascal Obry
0 siblings, 2 replies; 7+ messages in thread
From: Paul @ 2000-10-18 0:00 UTC (permalink / raw)
hi
please can anyone tell me how i can output a text from a variable on the
right side of the screen?
s := "testtext"
put...?????
tnx in advance
paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: output something on the right side
2000-10-18 0:00 output something on the right side Paul
@ 2000-10-18 0:00 ` tmoran
2000-10-19 0:00 ` Pascal Obry
1 sibling, 0 replies; 7+ messages in thread
From: tmoran @ 2000-10-18 0:00 UTC (permalink / raw)
Have you looked at Ada.Text_IO.Set_Col?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: output something on the right side
2000-10-18 0:00 output something on the right side Paul
2000-10-18 0:00 ` tmoran
@ 2000-10-19 0:00 ` Pascal Obry
2000-10-21 0:00 ` Robert Dewar
1 sibling, 1 reply; 7+ messages in thread
From: Pascal Obry @ 2000-10-19 0:00 UTC (permalink / raw)
"Paul" <gustino2001@hotmail.com> writes:
> hi
>
> please can anyone tell me how i can output a text from a variable on the
> right side of the screen?
>
> s := "testtext"
> put...?????
>
Sure.
Put (" " & s);
:)
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: output something on the right side
2000-10-21 0:00 ` Robert Dewar
@ 2000-10-21 0:00 ` DuckE
2000-10-21 0:00 ` Pat Rogers
0 siblings, 1 reply; 7+ messages in thread
From: DuckE @ 2000-10-21 0:00 UTC (permalink / raw)
"Robert Dewar" <robert_dewar@my-deja.com> 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);
SteveD
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: output something on the right side
2000-10-21 0:00 ` DuckE
@ 2000-10-21 0:00 ` Pat Rogers
2000-10-22 0:00 ` DuckE
0 siblings, 1 reply; 7+ messages in thread
From: Pat Rogers @ 2000-10-21 0:00 UTC (permalink / raw)
"DuckE" <nospam_steved94@home.com> wrote in message
news:5OoI5.5432$E85.90720@news1.sttls1.wa.home.com...
>
> "Robert Dewar" <robert_dewar@my-deja.com> 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;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: output something on the right side
2000-10-19 0:00 ` Pascal Obry
@ 2000-10-21 0:00 ` Robert Dewar
2000-10-21 0:00 ` DuckE
0 siblings, 1 reply; 7+ messages in thread
From: Robert Dewar @ 2000-10-21 0:00 UTC (permalink / raw)
In article <u3dhsu26i.fsf@wanadoo.fr>,
Pascal Obry <p.obry@wanadoo.fr> wrote:
>
> Put (" "
& s);
>
> :)
>
> Pascal.
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 :-)
Sent via Deja.com http://www.deja.com/
Before you buy.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: output something on the right side
2000-10-21 0:00 ` Pat Rogers
@ 2000-10-22 0:00 ` DuckE
0 siblings, 0 replies; 7+ messages in thread
From: DuckE @ 2000-10-22 0:00 UTC (permalink / raw)
> > 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;
>
No.
I guess that's the danger with not posting a complete example (as you just
did).
SteveD
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2000-10-22 0:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-18 0:00 output something on the right side Paul
2000-10-18 0:00 ` tmoran
2000-10-19 0:00 ` Pascal Obry
2000-10-21 0:00 ` Robert Dewar
2000-10-21 0:00 ` DuckE
2000-10-21 0:00 ` Pat Rogers
2000-10-22 0:00 ` DuckE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox