• mmichlol released this 2026-02-07 17:43:54 +00:00 | 6 commits to main since this release

    This massive update turns PCC into a Turing-complete language capable of running complex algorithms and games. It introduces loops (while), advanced boolean logic (&&, ||), and a random number generator.

    New Features

    • Control Flow:
      • While Loops: Added while (condition) { ... } support.
      • Advanced IFs: Support for complex conditions like if (a == 1 && b == 2).
      • Boolean Logic: Added && (AND) and || (OR) operators.
    • Randomness:
      • randint(min, max): New function in std/Random.pcc to generate random numbers.
      • System Calls: Added backend support for rand, srand, and time from C runtime.
    • Math:
      • Division & Modulo: Added support for / and % operators.

    📚 Standard Library Updates

    • std/Random.pcc: Includes randomize() (seed generator) and randint().
    • std/Input.pcc: Now fully stable with improved key handling.

    🛠 Technical Improvements

    • Parser Upgrade: The parser now recursively analyzes conditions inside if statements, allowing for temporary variable generation and multi-step logic evaluation.
    • CodeGen Optimization: Improved JMP handling for loops and logical short-circuits.

    📦 How to use:

    1. Download the latest release from the Assets section below.
    2. Unzip the archive to C:/PCC/.
    3. Run setup.bat as Administrator.
    4. Compile your code from anywhere:
      PCC.exe file.pcc
      
    Downloads