* Help!
@ 2003-02-24 11:44 Paul Gregory
2003-02-24 13:07 ` Help! ( University of Brighton homework problem ) Larry Kilgallen
2003-02-24 13:08 ` Help! Preben Randhol
0 siblings, 2 replies; 4+ messages in thread
From: Paul Gregory @ 2003-02-24 11:44 UTC (permalink / raw)
I'm having a few problems with my school ADA project.
I have to write a program which translates 10 English words to French
but when it Translates a sentence it does it in upper case instead of a
capital letter for the first letter and lower case for the rest.
Any ideas how I could get round this ?
PG
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help! ( University of Brighton homework problem )
2003-02-24 11:44 Help! Paul Gregory
@ 2003-02-24 13:07 ` Larry Kilgallen
2003-02-24 13:08 ` Help! Preben Randhol
1 sibling, 0 replies; 4+ messages in thread
From: Larry Kilgallen @ 2003-02-24 13:07 UTC (permalink / raw)
In article <3E5A05A2.3F1379EC@bton.ac.uk>, Paul Gregory <pg16@bton.ac.uk> writes:
> I'm having a few problems with my school ADA project.
>
> I have to write a program which translates 10 English words to French
> but when it Translates a sentence it does it in upper case instead of a
> capital letter for the first letter and lower case for the rest.
>
> Any ideas how I could get round this ?
If I were doing it, I would make a separate phase to apply the
capitalization rules for the output language. You might want
to do the same thing for punctuation, since if you later change
the program to have the output language be Spanish, I think the
punctuation rules are different for questions.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help!
2003-02-24 11:44 Help! Paul Gregory
2003-02-24 13:07 ` Help! ( University of Brighton homework problem ) Larry Kilgallen
@ 2003-02-24 13:08 ` Preben Randhol
2003-02-24 13:10 ` Help! Preben Randhol
1 sibling, 1 reply; 4+ messages in thread
From: Preben Randhol @ 2003-02-24 13:08 UTC (permalink / raw)
Paul Gregory wrote:
> I'm having a few problems with my school ADA project.
>
> I have to write a program which translates 10 English words to French
> but when it Translates a sentence it does it in upper case instead of a
> capital letter for the first letter and lower case for the rest.
>
> Any ideas how I could get round this ?
Is this the assignment or is it only a part of it?
with Ada.Characters.Handling;
use Ada.Characters.Handling;
To_Lower (Your_String (Your_String'First + 1 .. Your_String'Last);
--
Preben Randhol ---------------- http://www.pvv.org/~randhol/ --
"Violence is the last refuge of the incompetent", Isaac Asimov
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-24 13:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-24 11:44 Help! Paul Gregory
2003-02-24 13:07 ` Help! ( University of Brighton homework problem ) Larry Kilgallen
2003-02-24 13:08 ` Help! Preben Randhol
2003-02-24 13:10 ` Help! Preben Randhol
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox