Need help for Personal Project

Please discuss general Delphi programming topics here.

Need help for Personal Project

Postby Adam2705 » June 19th, 2003, 1:04 pm

I'm writing to ask if anybody here is any good at or knows anything about programming in Delphi.

I am currently working on (independantly)writing a program that can code and decode various strings of text.
What I have is a Pseudo Code which I need translated into the Delphi Language so that the task can be performed.

If anybody can give me a rough code along the lines of this then I'de be very grateful:

FOR THE FIRST LINE TO THE LAST
BEGIN
FOR THE FIRST CHAR TO THE LAST CHAR
BEGIN
CONVERT TO No.
ADD 4 TO No.
CONVERT NEW No. BACK TO CHAR
ADD TO NEW LINE
END
ADD NEW LINE TO MEMO BOX 2

The setup of the program is that of one memo box at the top which the text can be entered into that needs translating. At the moment any text can be entered or a saved file can be. The code that I need (from the above pseudo) is to, for example, add 4 to what's already there. To make this clear I'll give an example.

eg. Say the code to be coded is THE SKY IS BLUE. When four characters are added to this it becomes the coded message XLI WOC MW FPYI.

If anyone who knows about this and thinks they can help please do. Also if you need more information just ask and I'll do my best to make it more clear. Also, I will be posting this on many other computing based sites (thought I';d come here first because there might be more chance of a response) so don't worry if nobody can help in anyway.

Cheers.
Adam2705
Member
Member
 
Posts: 2
Joined: June 19th, 2003, 1:02 pm

Postby Adam2705 » June 19th, 2003, 1:07 pm

I'm using Delphi 6 btw.

Many Thanks.
Adam2705
Member
Member
 
Posts: 2
Joined: June 19th, 2003, 1:02 pm

Laziness

Postby everclearmind » June 26th, 2003, 9:28 am

:shock: Stop being lazy, why program if you can't be bothered to do it your self huh?? What your saying there is quite easy, look at ur help or don't do programming. :?: :?: :?:

EverClearMind
Jeramy - EverClearMind
everclearmind
Member
Member
 
Posts: 2
Joined: May 21st, 2003, 3:55 pm
Location: Cornwall, UK

Postby richardchaven » June 26th, 2003, 3:01 pm

Code: Select all
var
   ThisString : String;
   Counter : Integer;
begin
   ThisString := Memo1.Lines.Text;
   for Counter := 1 to Length(ThisString) do
       ThisString[Counter] := Chr(Ord(ThisString[Counter]) + 4);
   Memo2.Lines.Text := ThisString;
end;


To everclearmind: he is asking for help because it is not easy for him. If you don't want to help, just stay off the thread.
richardchaven
Active Member
Active Member
 
Posts: 20
Joined: May 30th, 2003, 1:30 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 2 guests