I am in the middle of writing a much longer post about variations and recent additions to Pascal syntax in Delphi, Oxygene and Lazarus, but at the same time I also decided to start on the process of migrating some of my code to Lazarus and FPC. In the process I have hit upon a snag.
Ever since I discovered that Delphi 7 (SEVEN!) supported “dotted unit names”, I have adopted this style of unit naming in my own code organisation. In Delphi 7 this incurred some less than desirable behaviours in the IDE, since the support for dotted unit names was at that time a little… preliminary.
Sadly, this means that – as far as I can tell – none of my existing units can be used “as-is” in Lazarus and FPC. There is no support for dotted unit names there, not even with FPC set to “Delphi” syntax parsing.
At first I thought this meant that my Lazarus/FPC ambitions were stalled at a disappointingly early stage.
However, not to be deterred I quickly I found that several suggestions have already been made as to how FPC might go about implementing dotted unit names, some of which aim to improve on the approach in Delphi (though in Delphi mode I would expect things to behave in as Delphi-like a way as possible, obviously).
Then I found that some support in this area has already made it’s way into the latest development version of the FPC compiler.
All I need to do now is figure out how to get Lazarus working with this later, pre-release build of the FPC compiler (something which I gather is possible, just not “plug-and-play”). I also need to be a little cautious as, being pre-release, whatever form the dotted unit name support in the current FPC trunk takes, it could still change.
Comments are now closed.