I'm working on a component that should be shared between Delphi and C++Builder, so I'm using Pascal as the lingua franca. Because I don't have Delphi on my computer at home, I first created the component in the Lazarus IDE. Now I "ported" it to Delphi and found an astonishing syntax problem:
This compiles with FPC (but not Delphi):
FSync.FSyncMethod := @SyncCheckInput;
This compiles with Delphi (but not FPC):
FSync.FSyncMethod := SyncCheckInput;
How can I share a unit between Lazarus and Delphi despite this syntactic divergence?
TThread
and itsSynchronize()
method: FreePascal Wiki | Multithreaded Application Tutorial | The TThread Class – ConvexoconcaveApplication.QueueAsyncCall
in Lazarus andPostMessage
to an invisible Window (viaAllocateHWnd
) in Delphi. Of course, I used theTThread
class, butSynchronize
was not helpful in my case because of its rendezvous feature. Thanks anyway :) – RedwineTThread
also has an asynchronousQueue()
method. – ConvexoconcaveQueue
method in Delphi 4, that I have to use (I'm not sure, I've no D4 or its docs at hand now). So I better remove the sidenote from the question or be more specific about the versions I'm using? – RedwineQueue()
does not exist in D4. FreePascal mimics D7. – ConvexoconcaveTThread.Queue
does currently not exist in the LCL. – Redwine