{"id":5558,"date":"2025-04-14T11:42:04","date_gmt":"2025-04-14T11:42:04","guid":{"rendered":"https:\/\/castle-engine.io\/wp\/?p=5558"},"modified":"2025-04-14T11:42:04","modified_gmt":"2025-04-14T11:42:04","slug":"modern-pascal-course-examples-and-slides-updates-to-modern-pascal-book-to-fully-support-both-delphi-and-fpc","status":"publish","type":"post","link":"https:\/\/castle-engine.io\/wp\/2025\/04\/14\/modern-pascal-course-examples-and-slides-updates-to-modern-pascal-book-to-fully-support-both-delphi-and-fpc\/","title":{"rendered":"Modern Pascal course examples and slides, updates to modern Pascal book to fully support both Delphi and FPC"},"content":{"rendered":"<table class=\"thumbnails thumbnails-align-right\"><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2025\/04\/modern_pascal_organization_icon.png\"\n             class=\"screenshot\"\n             title=\"Modern Pascal icon\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2025\/04\/modern_pascal_organization_icon-200x197.png\"\n             width=\"200\" height=\"197\" \n            alt=\"Modern Pascal icon\"\n          ><\/a><\/td><\/tr><\/table>\n<ol>\n<li>Last week I made a course teaching <em>modern Pascal<\/em>, <a href=\"https:\/\/www.bsc.com.pl\/szkolenie-nowoczesny-obiektowy-pascal\/\">organized by BSC (Embarcadero branch in Poland)<\/a>. We started from basics (structural and imperative programming, classes) and went on to advanced things (TComponent, various ways to deal with memory management, class references, generics, and more). It total, it was 2 days * 6 hours. Mostly lectures, i.e. <em>&#8220;Michalis talking and showing&#8221;<\/em>, but also with some time to do exercises in Delphi.\n<p>I was happy to got very positive feedback from the participants! To let everyone benefit, I&#8217;m publishing materials from it:<\/p>\n<ul>\n<li>Repository with all (38, as of now) examples: <a href=\"https:\/\/github.com\/modern-pascal\/modern-pascal-course\">https:\/\/github.com\/modern-pascal\/modern-pascal-course<\/a><\/p>\n<\/li>\n<li>\n<p>Slides (in Polish): <a href=\"https:\/\/castle-engine.io\/bsc_pascal_1\">Day 1<\/a>, <a href=\"https:\/\/castle-engine.io\/bsc_pascal_2\">Day 2<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>We used Delphi during the course, but I made sure all information and examples is compatible also with the open-source FPC compiler. For this, we used FPC <em>Delphi mode<\/em> syntax.<\/p>\n<p>We use <a href=\"https:\/\/castle-engine.io\/github_actions\">GitHub Actions<\/a> to make sure this is true: all the examples compile with FPC and Delphi. I created a new GitHub organization for this, <a href=\"https:\/\/github.com\/modern-pascal\/\">https:\/\/github.com\/modern-pascal\/<\/a>, useful to use my self-hosted runners with Delphi across non-CGE projects.<\/p>\n<\/li>\n<li>\n<p>To not stop above, I pushed an upgrade to our <a href=\"https:\/\/castle-engine.io\/modern_pascal\">Modern Object Pascal Introduction for Programmers<\/a>.<\/p>\n<p>This updates a few things, most notably adds a section <a href=\"https:\/\/castle-engine.io\/modern_pascal#_compilers_and_fpc_syntax_modes\">Compilers and FPC &#8220;syntax modes&#8221;<\/a> and adjusts all the text and examples to be relevant for Delphi too. Where the feature is FPC-specific (like CORBA interfaces or global operator overloads), we mention it clearly. Just like with <a href=\"https:\/\/castle-engine.io\/\">Castle Game Engine<\/a>, we want to support both compilers in all teaching materials.<\/p>\n<p>The examples in the book still use the FPC <em>ObjFpc<\/em> mode, with some <a href=\"https:\/\/github.com\/modern-pascal\/modern-pascal-introduction\/wiki\/Some-differences-betwen-FPC-ObjFpc-mode-and-Delphi-(and-FPC-Delphi-mode)\">differences between ObjFpc and Delphi modes<\/a>. When using FPC, this is the recommended mode (default in Lazarus and CGE projects), so we want to show it, even though it&#8217;s a bit more work.<\/p>\n<\/li>\n<\/ol>\n<p>Have fun with modern Pascal! If you like this work, please <a href=\"https:\/\/www.patreon.com\/castleengine\">support us on Patreon<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week I made a course teaching modern Pascal, organized by BSC (Embarcadero branch in Poland). We started from basics (structural and imperative programming, classes) and went on to advanced things (TComponent, various ways to deal with memory management, class references, generics, and more). It total, it was 2 days * 6 hours. Mostly lectures, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/castle-engine.io\/wp\/2025\/04\/14\/modern-pascal-course-examples-and-slides-updates-to-modern-pascal-book-to-fully-support-both-delphi-and-fpc\/\" class=\"more-link\">Continue reading  \u27a4<span class=\"screen-reader-text\"> &#8220;Modern Pascal course examples and slides, updates to modern Pascal book to fully support both Delphi and FPC&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":5559,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"publish_to_discourse":"1","publish_post_category":"9","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"6540","discourse_permalink":"https:\/\/forum.castle-engine.io\/t\/modern-pascal-course-examples-and-slides-updates-to-modern-pascal-book-to-fully-support-both-delphi-and-fpc\/1864","wpdc_publishing_response":"","wpdc_publishing_error":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-5558","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2025\/04\/modern_pascal_organization_icon.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9IgYW-1rE","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/5558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/comments?post=5558"}],"version-history":[{"count":8,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/5558\/revisions"}],"predecessor-version":[{"id":5567,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/5558\/revisions\/5567"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/media\/5559"}],"wp:attachment":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/media?parent=5558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/categories?post=5558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/tags?post=5558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}