(* code *) vs
Procedure vs Function
Method in Java = either “function” (if it has a return value) or “procedure” (if it has no return value) in Delphi
Overloading a procedure:
In the interface section of your unit, add “overload;” at the end of both overloaded versions of the procedure.
procedure TranslateForm(form : TTntForm); overload; procedure TranslateForm(form : TForm); overload;
In order to have both an Except and Finally block for the same line of code, you have to nest Try blocks, like this:
Try Try causeSomeRandomException(); except on E:Exception do ErrorMsg(num,'Error:',E.Message,True); end; finally doSomeCleanup(); end;
Other suggested reading:
Comments on some of the differences the author found less enjoyable
It’s going the other way Delphi to Java, so it’ll point out areas of difference, but not the Delphi syntax.
Compares C++, Java, and Object Pascal (Delphi)’s OOP Features.