Posts

New inline if statement slated for Delphi 13

The new feature currently planned for release in the forthcoming Delphi 13 that I'm most excited about is the inline if statement. According to Marco Cantu's blog post , the new syntax is like this: X := if Left < 100 then 22 else 45; Another use is something like this: ShowMessage(if Odd(X) then 'odd' else 'even'); The values returned from the then and else parts must be of the same or compatible type. Apart from being really chuffed that this feature is being added I'm just as happy that the syntax is Pascal like, and is therefore more readable than the cryptic C style ?: construct. Also pleasing is the fact that Embarcadero have gone with version number 13 instead of being ridiculously superstitious! Since Delphi 13 has yet to be released the usual disclaimer applies that this feature is not guaranteed to be included.

Delphi / C++ Builder CE License Issues Resolved

I just heard from Ian Barker @ Embarcadero that some Delphi and C++ Builder Community Edition users have been receiving messages that their CE license was expiring. Unfortunately, when they went to renew, they would get an unhelpful reply which didn't renew their license (and incorrectly mentioned a trial period). That issue should now be solved. If you've had that problem then hou should go to the relevant one of the following links which should let you successfully renew your CE license for another year: https://www.embarcadero.com/products/delphi/starter/free-download https://www.embarcadero.com/products/cbuilder/starter/free-download If you still have problems, please contact Embarcadero direct, not me! There's no news yet about when the next Community Edition will be released or what version of RAD Studio it will be based on. It's currently the equivalent to Delphi 12.1 / C++Builder 12.1.

New and very basic template replacement program released

Image
Yesterday the first release of my new console application, BogBat v0.1.0 was released. I wanted a program to replace templates (or placeholders) in a text file with values from a data file. I didn't need anything fancy such as loops, conditionals, built in text processing functions or white space control. Only simple replacement was needed. And the name, well it's the Bog Bas ic t emplate program. The reason I wanted this program was to help automate some program builds by automatically updating version numbers and dates in source files. To be honest I'd started writing this program in a private GitHub repo in 2023 and forgotten all about it. Upon stumbling across it the other day I decided to finish it and make the repo public. Anyhow, here it is. All the usual warnings about early release code apply: bugs likely, command line and functionality subject to change across v0.x releases. The program takes two input files, one containing the templated text and another contai...

Array Utilities Unit GitHub repo now public

Whoops! It's just been pointed out to me that the Array Utilities Unit I published yesterday isn't accessible because the GitHub repo is private. Thx Luca. I've now made it public . ➡️  Download the 1st release from GitHub Sorry about that

New Array Utilities Library Unit released

Image
Yesterday I added a shiny new unit to the DelphiDabbler Code Library - the Array Utilities Unit . It lives in the ddablib/arrayutils  repo on GitHub. This unit, named DelphiDabbler.Lib.ArrayUtils.pas ,   provides a single "Advanced" record, TArrayUtils , that contains static methods that perform common operations on generic arrays. There are numerous overloaded versions of many of the methods. Every method operates on a given generic array that is passed as a parameter, either as an array of T or a TArray<T> . The unit requires Delphi XE or later. It has been tested with Delphi XE and Delphi 12. The code depends only on the Delphi RTL, so it should work for any platform supported by Delphi and be both VCL and FireMonkey compatible. I've only tested Windows 32 bit and 64 bit targets. There are far too many methods to describe in here, but you can find them all listed and explained in the comprehensive  online documentation . As a taster you'll find Methods that ...

CodeSnip v4.26.0 released

Image
CodeSnip v4.26.0 has just been released. This release focusses mainly on adding more file formats when saving snippet information to file. You can now save such info in Plain Text, Markdown, HTML 5 & XHTML in addition to the existing Rich Text Format. The Help menu item that used to link to the CodeSnip blog now links here, as does any read-me file that links to the blog. There have been a few other changes and a minor bug fix which you can read about in the change log . ➤  Get v4.26.0 from GitHub

CodeSnip v4.25.0 released (includes a fix of a fix for a fix)

Image
It's nice to be able to release a version of  CodeSnip  containing new features instead of bug fixes. Except that this release also includes bug fixes, including episode 3 of the hibernation bug fix saga. So what's new? Not a lot except for some new snippet export options: For the longest time you've been able to get a copy on the clipboard all the information about a snippet that gets displayed in the detail pane. Now you can finally save the information directly to a file. The only option is Rich Text Format just now, but more formats may make an appearance later. When exporting Pascal units and annotated snippet source code various formats can be chosen. HTML 5 format export files has now joined the list or plain text, Pascal, RTF and XHTML Some annoying, but relatively trivial bugs have also been fixed. Go see the change log if you're curious. But I can't close this post without mentioning the hibernation bug fix saga. A third fix of the bug where CodeSnip somet...