Pascal Online: Free Pascal Editor and Compiler
Write and run Pascal programs right in the browser — no compiler install needed. Send a link, and two people can work on a problem together: in an interview, or walking through a solution side by side. Free and no sign-up.
Free, no sign-upCode sample
program Primes;
var
n, i, j: integer;
isPrime: boolean;
begin
n := 30;
for i := 2 to n do
begin
isPrime := true;
for j := 2 to i div 2 do
if i mod j = 0 then isPrime := false;
if isPrime then write(i, ' ');
end;
writeln;
end.
Output
2 3 5 7 11 13 17 19 23 29
What the editor does
- Free Pascal 3.2: the program compiles and runs on the server, with compile errors and output visible right away.
- Nothing to install: the editor, with Pascal syntax highlighting, works in the browser on any computer.
- Real-time collaborative editing: up to 5 participants in one session, with edits and cursors visible instantly.
- The problem statement is written in Markdown right in the session, next to the code.
- After a free sign-in: a task bank, an interview mode with timers, and session history.
How to run the interview
- Click "Open the Pascal editor" — the session is created with a sample program.
- Describe the task in Markdown and send the link: the other participant needs no sign-up.
- Work on the problem together: run the program after each step, and discuss compile errors and output — a convenient way to walk through a solution piece by piece.
Typical interview tasks
- Find all primes up to N by trial division or the Sieve of Eratosthenes, and compare which approach is faster.
- Compute the GCD of two numbers with Euclid's algorithm — by subtraction and by remainder.
- Sort an array with bubble sort or insertion sort and count the number of swaps.
- Check whether a string is a palindrome, ignoring spaces.
- Find the sum and the digit count of a natural number using div and mod.
- Find the maximum element in each row of a two-dimensional array.
Limitations
- This is Free Pascal, not PascalABC.NET: features available only in PascalABC.NET will not compile.
- No keyboard input: readln receives no data — set values inside the program.
- There are no autotests for Pascal — verify the result with output: print the answer for several inputs and compare it with what is expected.
- Compilation is limited to 10 seconds, and a run to 3 seconds and 64 KB of output.
FAQ
- Which compiler is used?
- Free Pascal 3.2. The program compiles and runs on the server, so there is nothing to install.
- Will code from PascalABC.NET run?
- Yes, as long as it does not use features available only in PascalABC.NET: standard Pascal compiles fine with Free Pascal.
- Can I read keyboard input (readln)?
- No, the session has no keyboard input. Set the values directly in the program — by assignment or as constants.
- Can two people work together?
- Yes. Send the session link — up to 5 participants can work in one editor, with edits visible in real time.
- Do I need to sign up?
- No. Create a session and start writing code right away. Signing in is only needed for the task bank and history: without it the session is not saved, but the code can be copied.