{"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=\"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 decoding=\"async\" loading=\"lazy\" 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=\"(max-width: 519px) 100vw, 519px\" data-recalc-dims=\"1\" \/><\/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=\"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_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4,179],"tags":[175,174,185],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/s1TKYv-1218","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1129,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1129\/","url_meta":{"origin":1218,"position":0},"title":"Lazarus Goes 1.0","date":"30 Aug 2012","format":false,"excerpt":"As some people may have already noticed, Lazarus went \"1.0\" yesterday. The sensitivity - and some might say serendipity - of the timing of this can hardly have escaped many people, including myself. Since I now intend taking a far greater interest in the alternatives to Delphi for those of\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1148,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1148\/","url_meta":{"origin":1218,"position":1},"title":"Lazarus 1.0 : First[-ish] Impressions","date":"05 Sep 2012","format":false,"excerpt":"It has been a looong time since I last looked at Lazarus. So long in fact that I don't remember exactly when it was. Whenever it was I don't think I ever actually managed to even get it up and running at that point. Certainly I don't remember much about\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Screen-Shot-2012-09-05-at-19.55.24-.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1233,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1233\/","url_meta":{"origin":1218,"position":2},"title":"ReverseBytes()","date":"20 Sep 2012","format":false,"excerpt":"In some comments on StackOverflow, Jeroen asked me to post my code for reversing bytes. Rather than posting code into that question\/answer that wasn't directly relevant to the question\/answer, I decided to quickly throw the code up on here. The intent with ReverseBytes() is - as the name says -\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1207,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1207\/","url_meta":{"origin":1218,"position":3},"title":"Adventures in Syntax: Something Old, Something New etc&#8230;","date":"20 Sep 2012","format":false,"excerpt":"As the post title says, this will be a brief detour through some features of the Pascal language and a presentation of some (theoretical) alternatives that could have been introduced instead. That is, some are real but little known syntax, others are what I think might be preferable to the\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1122,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1122\/","url_meta":{"origin":1218,"position":4},"title":"SA Increased Unexpectedly ?  Check your T&#8217;s and C&#8217;s","date":"30 Aug 2012","format":false,"excerpt":"Two days ago I received a renewal quote for my XE2 Professional SA. The quote included an increase that I wasn't expecting, having not been made aware of the clause in the SA T's and C's that allows for an annual increase of up to 5%, regardless of the fact\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2537,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/2537\/","url_meta":{"origin":1218,"position":5},"title":"Delphi for Linux: Enterprise \/ Architect Only + ARC Imposed = &#8230; ?","date":"13 Feb 2017","format":false,"excerpt":"With the lack of any easily available information from Embarcadero, in yesterday's post I had to speculate as to the cost that might be involved with the new Delphi for Linux. According to comments it seems that I was being overly generous by suggesting that only a Pro Edition of\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/amnesty.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/1218"}],"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}]}}