Re: strReverse

[ DelphiLand FAQ ]

Posted by Joey *DClub* on July 13, 2004 at 13:40:38:

In Reply to: Re: strReverse posted by keith on July 13, 2004 at 05:42:28:

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;
aNumber: Integer; //This generated a variable aNumber as type Integer. Which means its a number.
//And from here on you can use aNumber freely.
aNumber := 100000;

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 ]