C to Delphi converter (2018)
github.com
github.com
Delphi can be used for macOS and iOS development, which is what Image-Line did for FL Studio:
https://www.embarcadero.com/case-study/image-line-software-c...
Edit: I notice that the post below says they're using Delphi for both the PC and the Mac version now... It could be a recent development. Last year there were posts on the Image-Line forums saying they were still using Free Pascal, due to the fact that Delphi (at that point) could not produce 64 bit binaries for Mac.
#include <stdio.h>
int main()
{
if (((unsigned char) 255) + ((unsigned char) 255) == 510) {
puts("yes");
} else {
puts("no");
}
}
(The code outputs "yes", and it does not rely on undefined behavior.)In other words, I doubt that proper “conversion”, with all the C semantics, is feasible.
if (unsigned char then 255) + ((unsigned char) 255) = 510 then beginEx:
unsigned char a = 255;
unsigned char b = 255;
if ((a + b) == 510) {
puts("yes");
}
becomes unsigned char a = 255;
unsigned char b = 255;
if a + b then = 510 then begin
WriteLn('yes');
end;
instead of var a,b: byte;
begin
a := 255;
b := 255;
if (a + b) = 510 then begin
writeln('yes');
end;
It's also worth noting that assuming parenthetical grouping is fixed, the C code snippet should work fine; according to the online compiler I was toying around with, Pascal uses integer type promotion.I use it for Windows ISAPI dlls against various backend databases (mostly MS SQL Server).
The newer output however from this stack is from its cross platform and mobile features - Firemonkey (native UI and cross platform API wrapper). I haven’t used it yet but I have seen a few apps on AppStore and Play using them.
http://docwiki.embarcadero.com/RADStudio/Rio/en/FireMonkey_N...
http://docwiki.embarcadero.com/RADStudio/Rio/en/FireMonkey_N...
With more native Android controls coming in the future.
Of course I mostly care about macOS. Unfortunately that's the area that Embarcadero appears to mostly ignore.
On that list, I use WinRAR and BeyondCompare every day. I also see Skype but I think the client was rewritten in Electron/Javascript to be cross-platform Windows/Mac/Linux.
Not on that list is AcrylicDNS which I use as a DNS "firewall". The author provides Delphi source code for it: (https://mayakron.altervista.org/wikibase/show.php?id=Acrylic...)
https://www.embarcadero.com/case-study
And the Delphi product page:
The ecosystem had been on a strong decline for a while. The tools just to compile an application are incredibly expensive . Experienced developers have long left to other languages with more job prospects. New developers are not learning Delphi in university or anywhere.
From my perspective, as a developer that uses more up-to-date tools, Delphi is not great, but it's not bad either.
It does appear to treat C string constants as Pascal string constants, so if those are to be indexed correctly, it must be somewhat clever.
Edit: in that case, better target FreePascal or Lazarus.
Still an interesting teaching tool, as long as the user understands it's very limited.
It had one unexpected glitch:
// C
if (known_devices & BIT(0))
// Pascal
if known_devices and BIT(0 then )The FreePascal guys though have put in some effort to create useable LCL interfaces (the Lazarus equivalent of Delphi's VCL) to interfaces to Qt4 and Qt5