QB64 Error handling being upgraded...by (no login)I'm currently working on the (rather boring) task of upgrading QB64's error handling to make it even more like QBASIC. The upgrade will address issues such as: i) Multiple errors being reported for a single command: Example: a=SQR(-1)+SQR(-1)+SQR(-1) In QBASIC: Creates 1 error In QB64: Creates 3 errors! ii) Processing of SUBS/FUNCTIONS with invalid data returned from a previous error calculating one or more of the SUB/FUNCTION parameters. Example: PRINT SQR(-1) In QBASIC: Didn't print anything In QB64: Prints 0 iii) Incorrect handling of errors occurring inside conditional statements: Example: IF SQR(-1)=2 THEN PRINT "QBASIC PRINTS THIS!" In QBASIC: After RESUME NEXT, it prints the message In QB64: After RESUME NEXT, it skips the conditional expression. Furthermore, after RESUME it runs the wrong line of code. There will always be some differences between QB64's error handling and QBASIC's error handling. These are: i) OVERFLOW errors will not happen in QB64 ii) In a line such as: a=SQR(-1) The value of a will be undefined. from IP address 58.106.166.186 |
| Response Title | Author and Date |
| *I like that QB64 produced 3 errors where QBasic produces 1. | on Mar 21 |
| Error handling upgrade complete (+other interesting info) | on Mar 23 |
| * :-) | on Mar 23 |