Author Topic: DATA statements, the QB64 IDE, and REM...  (Read 2755 times)

0 Members and 1 Guest are viewing this topic.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
DATA statements, the QB64 IDE, and REM...
« on: September 15, 2021, 01:10:09 pm »
I posted this at The Qbasic Forum, to see if TheBOB remembers if QBasic and QB64, the IDE's in particular, handle the apostrophe for REM in the same manner...

https://www.tapatalk.com/groups/qbasic/viewtopic.php?f=648955&t=39685

My guess is they do, but I was wondering if the IDE developers would have any interest in disabling the color change at and after the remark symbol, when it appears in a DATA statement?

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

FellippeHeitor

  • Guest
Re: DATA statements, the QB64 IDE, and REM...
« Reply #1 on: September 15, 2021, 02:30:45 pm »
My feeling is that it's too specific a situation. The highlighter would have to be aware that you're in a DATA line, then make an exception in case it's after a colon, etc. The highlighter is pretty heavy right now, so no promises.

I'd wrap those in quotation marks, that's my suggestion to bypass the unwanted coloring.

  [ You are not allowed to view this attachment ]  
« Last Edit: September 15, 2021, 02:32:08 pm by FellippeHeitor »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: DATA statements, the QB64 IDE, and REM...
« Reply #2 on: September 15, 2021, 02:45:32 pm »
It's also more extensive when you consider things like placing OR in a data statement is colored as a keyword, etc. Anyway, certainly not a pet peeve or priority. I just thought I'd check with Bob, as I can't recall how QBasic handled it, and post about it here, just in case it would be anything you would be interested in addressing somewhere down the line after bigger fish are fried.

Quotes turning off color makes since. Perhaps the same method to exclude quoted text could be modified and applied to DATA statements.

Thanks for having a look,

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

Offline david_uwi

  • Newbie
  • Posts: 71
    • View Profile
Re: DATA statements, the QB64 IDE, and REM...
« Reply #3 on: September 17, 2021, 04:49:56 am »
I've been working with microprocessors in recent times and they generally have tables rather than DATA.
They seem to me to be much more useful. They work something like this:

for i=1 to n
READTABLE, mytable,i,mydata(i)
next i
.
.
Table mytable
100
200
300
.
.
end table
Would such a thing be useful if it were available in QB64?

I should note that for microprocessors RAM is often limited compared to program memory. (The table is stored in program memory)