[fpc-pascal] Help translating C++ to Object Pascal

Sven Barth pascaldragon at googlemail.com
Tue Sep 14 21:41:14 CEST 2010


Am 14.09.2010 11:50, schrieb Graeme Geldenhuys:
> Hi,
>
> In a C++ method as shown below, does the '... return True;' immediately
> exit the HandleClientMessage method, or will it still continue processing
> the remainder of the method (just exiting the current code block)?
>
>
> --------------------------------
> int OXMainFrame::HandleClientMessage(XClientMessageEvent *event) {
>
>    if (_dndManager) {
>      if (_dndManager->HandleClientMessage(event)) return True;
>    }
>
>    if ((event->format == 32)&&  (event->data.l[0] == WM_DELETE_WINDOW)) {
>      CloseWindow();
>      return True;
>    }
>
>    return OXCompositeFrame::HandleClientMessage(event);
> }

"return Something;" in C/C++ is equivalent to "Exit(Something);" in 
FPC's Pascal.

Regards,
Sven



More information about the fpc-pascal mailing list