Welcome to PCC Documentation

PCC (PCC Compiler Collection) is a custom programming language created by Micha� Lewandowski. It is simple, fast, and compiles natively to x64 machine code.

New in v1.5: Function arguments, return values, local variables, and input handling.

Installation & Usage

To start coding in PCC, you need the PCC.exe compiler.

PCC.exe your_file.pcc PCC.exe -o my_program.exe your_file.pcc

Program Structure

Starting from v1.5, every PCC program must have a main function. This is the entry point of your application.

void main() { print(123); }

Variables & Math

We support two variable types:

  • int - integer numbers (32-bit)
  • bool - true/false values (1 or 0)

Variables are now local to functions. You can create variables inside main or any other function.

int x = 10; int y = 5; int sum = x + y; // Math operations bool check = 1;

Functions & Returns

PCC now supports functions with arguments and return values!

Defining Functions

You can define functions that take integer arguments and return a value.

int addNumbers(int a, int b) { int result = a + b; return result; } void greet() { print(777); }

Calling Functions

You can store the result of a function in a variable.

void main() { int sum = addNumbers(10, 20); print(sum); // Prints 30 greet(); }

Conditionals (IF)

You can control the program flow using if statements. Comparisons using == and boolean checks are supported.

int score = 100; if (score == 100) { print(1); // Success } if (score == 0) { print(0); // This will be skipped }

Input / Output

Printing

Use print(variable) or print(number) to display values in the console.

Input

Use input() to pause the program and wait for the user to press ENTER. This is useful for keeping the console window open.

void main() { print(999); input(); // Waits for user }

Full Example

Here is a complete program demonstrating all modern features:

int calculate(int val) { int res = val + 10; return res; } void main() { int start = 50; int end = calculate(start); // end becomes 60 print(start); print(end); if (end == 60) { print(1111); } // Keep window open input(); }