Pascal semantics stay
Objects are created and freed the Pascal way: Free frees immediately and deterministically. Strings and records are Pascal strings and records.
Closed beta 0.1 · Windows x64
DoPascal is an Object Pascal compiler for .NET. It compiles existing code as Pascal, without rewriting it into .NET idioms.
program hello;
{$IFDEF FPC}{$MODE DELPHI}{$ENDIF}
{$H+}
{$APPTYPE CONSOLE}
uses
SysUtils;
var
I: Integer;
Total: Int64;
begin
WriteLn('DoPascal: Object Pascal on .NET');
Total := 0;
for I := 1 to 10 do
Inc(Total, I * I);
WriteLn(Format('Sum of squares 1..10 = %d', [Total]));
WriteLn(UpperCase('hello') + ' ' + LowerCase('WORLD') + ' ' + IntToHex(48879, 4));
end.
> hello.exe
DoPascal: Object Pascal on .NET
Sum of squares 1..10 = 385
HELLO world BEEF
Why DoPascal
Objects are created and freed the Pascal way: Free frees immediately and deterministically. Strings and records are Pascal strings and records.
System, SysUtils, Classes, Math and Generics.Collections come from the original Free Pascal RTL sources.
The goal is that existing code compiles as it is, before any new syntax is added.
Proof
A unit written in 1996 (objects.pp) and a user program from a 2002 Free Pascal bug report compile and run on .NET without a single change to either file.
objects.pp, a unitStatus
DoPascal is in closed beta, ahead of the 0.1 release. Here is what the beta covers today, and what 0.1 will not include.
The output is a .NET program; on Windows you run hello.exe.
Support is not complete yet: the numbers below show how much already passes.
All of these are queued for after 0.1.
NeverMem[], Port[], interrupt and Turbo Pascal inline(...) have no meaning on .NET. far and {$F+} are accepted only syntactically.
88%
pass rate on the imported Free Pascal tests that are expected to work: 1,785 of 2,039.
3,634 / 0
tests pass and 0 fail in DoPascal's own full test suite.
249,007
lines of the original Free Pascal RTL in DoPascal's RTL packages.
Roadmap
No dates, only the order: compatibility first, new syntax later.
Windows x64 and the RTL with generics, as in the closed beta today. Still to come for 0.1: single-file deployment, then a public release.
A DCU-like mechanism that loads only what a program uses.
Trial compilations are in progress; every fix comes with a test.
The backend is prepared; the tests and the native launcher (hello.exe) run only on Windows x64 today.
Designed, not implemented. Language design v0.1: abi and ref types, uses platform, and an explicit boundary between the Pascal and .NET worlds.
Closed beta
Three steps. The closed beta costs nothing, and nothing is for sale.
Your email address and a password.
Open the link in the message we send you and enter your password.
The author grants beta access and lets you know by email; the downloads are then on the beta page.
The newsletter is optional: a separate checkbox when you sign up, off by default.
FAQ
Windows x64; the output is a .NET program. Linux x64 is on the roadmap; macOS and ARM are not part of 0.1.
No. GUI frameworks are not part of 0.1; they are queued for later versions.
Not yet. Using .NET types from Pascal is designed (language design v0.1) but not implemented.
It costs nothing, and nothing is for sale.
No. DoPascal is not affiliated with or endorsed by Embarcadero Technologies or the Free Pascal project. Its RTL packages are built from the original Free Pascal RTL sources.
We store what the account needs, such as your email address, a password hash, your language and your newsletter and beta status. The site has no analytics, no advertising and no tracking cookies, but our email provider records when our emails are opened and when their links are clicked. You can download your data or delete your account at any time. Details are in the privacy policy.