comp.lang.ada
 help / color / mirror / Atom feed
From: mjsilva@my-deja.com
Subject: Re: how to reverse output of a line using ada
Date: 2000/11/21
Date: 2000-11-21T00:00:00+00:00	[thread overview]
Message-ID: <8veacc$pdb$1@nnrp1.deja.com> (raw)
In-Reply-To: 8ve870$4fkkm$1@ID-62217.news.dfncis.de

In article <8ve870$4fkkm$1@ID-62217.news.dfncis.de>,
  "Florian Paulus" <mailme@ascat.de> wrote:
> Hi everybody!
>
> I got the following task:
>
> my program shall read a line and display it reversed.
>
> e.g. "World" should become "dlroW"
>
> is there any way to do this in Ada?

Certainly -- this is possible in any general-purpose language.

> i couldn't find any hint throughout the
> net. just something like in reverse but i don't know how to use this.

Think of the individual characters in the line as e.g. poker chips,
lined up in order.  How would you hand these poker chips to somebody,
one at a time in reverse order?  Once you can describe that process in
detail you can write the code.

BTW, if you don't know what poker chips are there in .de, just think of
individual squares of paper with single characters written on them...

Mike


Sent via Deja.com http://www.deja.com/
Before you buy.




  parent reply	other threads:[~2000-11-21  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-21  0:00 how to reverse output of a line using ada Florian Paulus
2000-11-21  0:00 ` Ted Dennison
2000-11-21  0:00 ` mjsilva [this message]
2000-11-21  0:00 ` Adrian Knoth
2000-11-22  0:00 ` Paul Cass
replies disabled

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