Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 9ec02fc

Browse files
committed
Release v0.3.0: Production-Ready Milestone
This release brings NitroPascal from proof-of-concept to production-ready with comprehensive string handling, file I/O, exception handling, dynamic data structures, external library integration, and conditional compilation - everything you need to build real, working applications. KEY MILESTONE: NitroPascal now has enough features to start doing REAL, PRODUCTIVE WORK. You can build actual applications that manipulate strings, read/write files, handle errors gracefully with exceptions, use dynamic arrays and sets, call external libraries, and target different platforms with conditional compilation. EXCEPTION HANDLING: - try..except blocks for error recovery - try..finally blocks for resource cleanup - try..except..finally for comprehensive error handling - raise statement for throwing exceptions - on E: Exception do for typed exception catching - Proper exception propagation and stack unwinding - Resource safety with deterministic cleanup DYNAMIC DATA STRUCTURES: - Dynamic arrays (array of T) with SetLength, Length, and High - Sets (set of T) with Include, Exclude, and membership testing (in) - Enhanced RTL with np::DynArray<T> and np::Set<T> implementations STRING MANIPULATION: - Complete string library: Copy, Pos, Delete, Insert - Case conversion: UpperCase, LowerCase - Whitespace handling: Trim, TrimLeft, TrimRight - Type conversion: IntToStr, StrToInt, StrToIntDef, FloatToStr, StrToFloat - Formatted output: Format function with variadic templates MATH LIBRARY: - Basic operations: Abs, Sqr, Sqrt - Trigonometry: Sin, Cos, Tan, ArcSin, ArcCos, ArcTan - Rounding: Round, Trunc, Ceil, Floor - Utility: Max, Min, Random, Randomize FILE I/O: - File management: Assign, Reset, Rewrite, Append, Close - Text I/O: Write(F), WriteLn(F), ReadLn - Binary I/O: BlockRead, BlockWrite - File positioning: Seek, FilePos, FileSize, Eof - File system: FileExists, DirectoryExists, CreateDir, GetCurrentDir - File operations: DeleteFile, RenameFile CONTROL FLOW ENHANCEMENTS: - Loop control: break, continue - Early return: exit, exit with return value - Simplified access: with statement - Forward declarations for functions and procedures ORDINAL FUNCTIONS: - Type inspection: Ord, Chr, Low, High, SizeOf - Iteration: Succ, Pred, Inc, Dec (with optional step) - Pointer utilities: Assigned MEMORY MANAGEMENT: - Advanced allocation: GetMem, FreeMem, ReallocMem - Memory operations: FillChar, Move - Block operations for efficient buffer manipulation EXTERNAL LIBRARY INTEGRATION: - External function declarations (external 'library.dll') - Multiple calling conventions: stdcall, cdecl, fastcall - Automatic string type conversion (PChar, PWideChar, PAnsiChar) - External library tracking for automatic linking - Seamless C/C++ interoperability CONDITIONAL COMPILATION: - Platform detection: WIN32, WIN64, LINUX, MACOS, MSWINDOWS, POSIX - Architecture detection: CPUX64, CPU386, CPUARM64 - Build mode detection: DEBUG, RELEASE - Application type: CONSOLE_APP, GUI_APP - Preprocessor directives: {$ifdef}, {$else}, {$endif} - Custom application type: {$apptype console|gui} PLATFORM SERVICES: - Command-line arguments: ParamCount, ParamStr - Program termination: Halt RUNTIME LIBRARY ENHANCEMENTS: - Enhanced np::String with comprehensive string manipulation - New np::DynArray<T> for dynamic array support - New np::Set<T> for set operations - File I/O wrappers maintaining Delphi semantics - Console input: ReadLn CODE GENERATION IMPROVEMENTS: - External function handling (no C++ declaration generation) - Automatic library dependency tracking - Calling convention mapping - String type conversions for external calls - Forward declaration support BUILD SYSTEM ENHANCEMENTS: - Automatic define injection based on target platform - Automatic define injection based on build mode - Architecture-specific defines - Application type defines - Windows subsystem control (console vs GUI) TESTING INFRASTRUCTURE: - Integrated test runner for validation - Comprehensive test suite covering all features This release represents a major leap forward in capability. With exception handling, string manipulation, file I/O, dynamic data structures, external library support, and conditional compilation, you can now build robust, real applications in NitroPascal. THE PRODUCTIVITY MILESTONE: NitroPascal is no longer just a compiler experiment - it's a tool you can use to build actual, working software. Parse files, manipulate data, handle errors gracefully, integrate with existing libraries, target multiple platforms, and ship real applications with confidence. Write once in pure Delphi. Compile to native C++. Run everywhere. Version: 0.3.0
1 parent d294d60 commit 9ec02fc

35 files changed

+5129
-713
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,4 @@ bin/test_small.json
9898
src/TASK.md
9999
src/TASK0.md
100100
src/TASK2.md
101+
checkpoint_base.zip

0 commit comments

Comments
 (0)