Convert C-Builder program to Delphi?

W

W. D.

Hi Folks,

My Delphi is rusty, and my C is corroded. Am I
understanding this properly?

CPP Code:

TMainForm *MainForm

Is this a declaration for a form named 'MainForm'
that is of type 'TMainForm'? Does the asterisk
indicate that it is a pointer, and hence not
stored in the 64K heap?

Would the Delphi equivalent be:

type
MainForm: class(TMainForm);

If so, where does the pointer go?


In the following code, what is the Delphi equivalent
of 'void __fastcall'?

void __fastcall TMainForm::Button1Click(TObject *Sender)
{
// Do some stuff
}

Why isn't 'MainForm' used instead of 'TMainForm'? I
thought 'TMainForm' was a type!

Also, why the double colons '::' ?

And, why the '*' preceding 'Sender'?

What would be the Delphi equivalent of the above
function?

I do sincerely apologize for these basic questions,
but I've been Googling like crazy and can't find
much on translating from Borland C Builder to
Delphi.

Many, many thanks for any help you can provide!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top