Author Topic: QB64may need a complete rewrite to address this hoffific bug I found!  (Read 2162 times)

0 Members and 1 Guest are viewing this topic.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Code: QB64: [Select]
  1.     Value = 0: (Valid)   Array is empty with no EOL.
  2.     Value = 1: (Invalid) Array is empty but has a EOL added. This should not be present, but I think it occurs when a line is initially erased. This needs more investigation.
  3.     Value > 1: (Valid)   Array contains text.
  4.  
  5.     Value = 0: [Valid]   Array is empty with no EOL.
  6.     Value = 1: {Invalid} Array is empty but has a EOL added. This should not be present, but I think it occurs when a line is initially erased. This needs more investigation.
  7.     Value > 1: |Valid|   Array contains text.
  8.  

So a trick to write block REM statements. It works great, unless you throw in brackets or some other characters, which are rejected by the IDE. In the code above, the first BLOCK REM is accepted, but the {{ and | characters will all bomb out in the second example.

So let me know when the complete rewrite is finished. :D

Actually, I do get what these metacommands were meant for, a way to conditionally include or exclude program code in the final compilation, but it would be nice to have a $REM $END REM someday.

Pete

Go Dodgers!
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: QB64may need a complete rewrite to address this hoffific bug I found!
« Reply #1 on: October 28, 2020, 02:52:29 am »
Honestly, I'm surprised that QB64 tosses those errors for us.  We should kick out of the reading/processing those lines completely, if the $IF block is invalid.  Since I haven't ran across this glitch in the past, I've never had to sort out where the syntax check for invalid characters pops up in the processing order of things.  I'd imagine the fix to this is probably just as simple as cutting/pasting the $IF process before the syntax checking process.  I'll dig into it later, when I get a little free time, if nobody else hunts down what needs to change operation order for us first.;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!