Re: strReverse


[ DelphiLand FAQ ]

Posted by keith on July 14, 2004 at 00:51:39:

In Reply to: Re: strReverse posted by Joey *DClub* on July 13, 2004 at 13:40:38:

procedure TForm1.Button1Click(Sender: TObject);
var
  aNumber , S: String;
begin
  S := Edit1.Text;
  aNumber := Edit1.Text;
  ShowMessage(aNumber);
end;

That will display the text that I enter into a Messagebox. I don't know how to incorporate the StrReverse. It seems like Delphi doesn't know what that is. There is not even in the help section. I want to basically encrpyt. Do that a bunch of times till I get scrambled text. Then press another button to reencrpyt it. There is no information anywhere about the StrReverse or the EncryptMsg .


: You get an undeclared identifier when you do not declare a variable. If you are getting this error you will need to declare the variable you are getting the undeclared identifier exception on. An example if it says
: "Undeclared idenfifier: 'aNumber'"
: This means you havent made a variable called "aNumber" or its not within the scope of the procedure/function.

: What you need to do is above the begin statement in procedures/functions code is use a "var" statement which will allow you to use your variable.

: procedure Something;
: var
: aNumber: Integer; //This generated a variable aNumber as type Integer. Which means its a number.
: begin
: //And from here on you can use aNumber freely.
: aNumber := 100000;
: end;

: BTW.
: IntToStr and StrToInt convert integer and string types to the other. This is helpful as you can only see strings you cant numbers and you can only count (and more) with numbers and not strings :)

: If you dont get it working post your code here and i'l has a look :)

: Joey ^__^


Related Articles and Replies:


[ DelphiLand FAQ ]