{"id":1218,"date":"2012-09-11T22:23:32","date_gmt":"2012-09-11T10:23:32","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=1218"},"modified":"2012-09-11T22:48:15","modified_gmt":"2012-09-11T10:48:15","slug":"1218","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/1218\/","title":{"rendered":"Going Dotty With Lazarus\/FPC"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span><p>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.<\/p>\n<p><!--more--><\/p>\n<p>Ever since I discovered that Delphi 7 (SEVEN!) supported &#8220;dotted unit names&#8221;, 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&#8230; preliminary.<\/p>\n<p>Sadly, this means that &#8211; as far as I can tell &#8211; none of my existing units can be used &#8220;as-is&#8221; in Lazarus and FPC. There is no support for dotted unit names there, not even with FPC set to &#8220;Delphi&#8221; syntax parsing.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2012-09-11-at-22.21.34-.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1220\" title=\"No Unit by That Name Here, Sorry...\" src=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2012-09-11-at-22.21.34-.png?resize=519%2C341&#038;ssl=1\" alt=\"\" width=\"519\" height=\"341\" srcset=\"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2012-09-11-at-22.21.34-.png?w=519&amp;ssl=1 519w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2012-09-11-at-22.21.34-.png?resize=300%2C197&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2012-09-11-at-22.21.34-.png?resize=150%2C98&amp;ssl=1 150w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/a><\/p>\n<p>At first I thought this meant that my Lazarus\/FPC ambitions were stalled at a disappointingly early stage.<\/p>\n<p>However, not to be deterred I quickly I found that <a href=\"http:\/\/wiki.lazarus.freepascal.org\/Namespaces\" target=\"_blank\">several suggestions have already been made<\/a> 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).<\/p>\n<p>Then I found that some support in this area has <a href=\"http:\/\/wiki.freepascal.org\/FPC_New_Features_Trunk\" target=\"_blank\">already made it&#8217;s way into the latest development version of the FPC compiler<\/a>.<\/p>\n<p>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 &#8220;plug-and-play&#8221;). 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span>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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4,179],"tags":[175,174,185],"class_list":["post-1218","post","type-post","status-publish","format-standard","hentry","category-delphi","category-lazarus-2","tag-fpc","tag-lazarus","tag-namespaces"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/s1TKYv-1218","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=1218"}],"version-history":[{"count":3,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1218\/revisions"}],"predecessor-version":[{"id":1222,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1218\/revisions\/1222"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=1218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=1218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=1218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}