CPascal

Better C with Pascal Syntax

A modernized systems programming language where every construct maps directly to equivalent C constructs at the binary level. Zero-overhead abstraction and complete C ABI compatibility with cleaner, more structured Pascal syntax for readable, maintainable code.

Systems Programming Redefined

Full C ABI Compatibility

Direct linking with any C library without bindings. Binary-compatible function pointers, structures, and identical memory layouts.

Clean Pascal Syntax

Structured programming with begin/end blocks, strong typing, clear procedure/function distinction, and readable control flow.

Zero Runtime Overhead

Direct compilation to efficient machine code via LLVM. No garbage collection, no RTTI, minimal runtime requirements.

Modern Language Features

Multiple assignment, ternary operators, compound assignment, inline assembly, variadic functions, and clean module system.

Advanced Systems Programming

Inline assembly with GCC-compatible syntax, atomic operations, direct hardware access, and platform-specific optimizations.

LLVM Powered

Built on LLVM infrastructure for optimal performance, cross-platform compilation, and advanced code optimizations.

Modern Pascal with C Compatibility

program ModernExample;

var
    A, B, Max: Int32;
    Value: Int32;

begin
    { Multiple assignment - modern syntax }
    A, B := 10, 20;
    
    { Ternary operator }
    Max := (A > B) ? A : B;
    
    { Compound assignment }
    Value := 5;
    Value += 10;  { Now Value = 15 }
    
    WriteLn('Max: ', Max);
    WriteLn('Value: ', Value);
end.