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

Recommended Answers

All 4 Replies

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

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

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.