0

where can i find good articles about Delphi?

what is wrong with this loop?

procedure TForm1.Button1Click(Sender: TObject);
var a: integer;
begin
for a:=1 to 5 do
begin
ShowMessage('Window: '+InToStr(a));
end;
end;

end.

i receive this error
[Error] Unit1.pas(31): Undeclared identifier: 'InToStr'

any help is appreciated

4
Contributors
4
Replies
5
Views
12 Years
Discussion Span
Last Post by dotnet_guru
0

where can i find good articles about Delphi?

what is wrong with this loop?

procedure TForm1.Button1Click(Sender: TObject);
var a: integer;
begin
for a:=1 to 5 do
begin
ShowMessage('Window: '+InToStr(a));
end;
end;

end.

i receive this error
[Error] Unit1.pas(31): Undeclared identifier: 'InToStr'

any help is appreciated

InToStr is not a function. You're looking for IntToStr which, funnily enough, converts Integers to Strings.

try goin to about.delphi.com if you need tutorials etc

0

You need to use ShowMessage('Window: '+IntToStr(a)); instead of InToStr...
There is no such function in delphi. For avoiding this type of typing error you first type In and press Crtl + Space. It will automatically complete the fuctions.
With regards,
Delphi Guru

0

there is no function calle intostr... use inttostr function to convert integer to string.

0

Yeah, That's correct... that was a typing mistake... I am really sorry for that.
With warm regards,
DotNet_guru.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.