01-19-2026, 05:25 PM
Well lets ask AI
So nice work around idea, no?
Quote:Using WITH/END WITH in QB64 Phoenix Edition (PE) would be a positive addition because it improves code readability and reduces the chance of typing errors, particularly when working with User-Defined Types (UDTs) that have many members.
Benefits of WITH/END WITH
Improved Readability: It allows you to perform a series of statements on a single object or UDT without having to specify the object's name repeatedly, making the code cleaner and easier to read.
Reduced Errors: By referencing the object only once, it minimizes potential typing errors in object names.
Potential Performance Gain (Historically): In older VB versions, using With...End With could offer a minor performance boost because the object's address reference was looked up only once at the beginning of the block, rather than for each property access. While this performance difference is likely negligible in modern compilers like QB64PE, the primary benefits are related to code maintenance and clarity.
Current Status in QB64PE
Currently, WITH/END WITH is not a supported feature in QB64PE's standard syntax, which primarily aims for compatibility with QuickBASIC 4.5. However, the idea has been discussed in the community forums, with users expressing a desire for this feature, especially those who frequently used it in VB6.
Recommendation
If you wish to see this feature officially implemented, the best approach is to engage with the developer community on the QB64 Phoenix Edition forum and the GitHub repository. The developers are actively adding enhancements and improvements, and community input can help prioritize new features.
In the meantime, a common workaround is to use a short, temporary variable as an alias for the object you are repeatedly accessing, though this is less elegant than a dedicated WITH block.
So nice work around idea, no?
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

