QB64 Phoenix Edition
Stretch a future keyword or a highlighting bug? - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2)
+---- Forum: Wiki Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=25)
+---- Thread: Stretch a future keyword or a highlighting bug? (/showthread.php?tid=3682)



Stretch a future keyword or a highlighting bug? - TempodiBasic - 05-12-2025

Hi
while I was reading the code of a famous application I observe that there is something weird, a name of a variable has the same color of the keywords!
So I try to DIM some other keywords used as complementary to another keyword, for example USING that has its role with PRINT but not alone, or BINARY or OUTPUT or RANDOM or OFF . In each of these my attempt to use a keyword as name of variable the IDE warns me about name already in use  and it highligthes the keyword with the color set for keywords.
So I have searched into wiki for this name colored as keyword but I find nothing!
And for this reason I post this code here
Code: (Select All)
Dim Shared Stretch As Long, HasBorder As Long
the result is the same both in QB64pe 4.0 both in 4.1 while it disappears in VSCode with GrymmJack extension for QB64pe.
here a screenshot

[Image: Stretch-highlighting-bug.jpg]

the orange window is VScode, the green window is QB64pe 4.1 (look at line 100) and the black window is Qb64pe 4.0...
I think that it is a glitch of parser of the IDE in the highlighting task.


RE: Stretch a future keyword or a highlighting bug? - RhoSigma - 05-12-2025

STRECH is an option to the $RESIZE meta-command

_STRETCH is an option to _FULLSCREEN

I.e. the highlighting is correct. You can use it as variable, because it's not a BASIC command by itself or related to command, but just an argument for an meta-command like the "ONLY" in "$CONSOLE:ONLY". You get an error for _STRETCH however because of the underscore use which makes it a reserved word.


RE: Stretch a future keyword or a highlighting bug? - SMcNeill - 05-12-2025

You can get a ton of these miscolorings with TYPE, if you try.

TYPE foo
   Name As String
   Color As String
END TYPE

These create valid types foo.Name and foo.Color, but the highlight will parse them and color them like a keyword above.  Just ignore it as a quirk of the highlight parsing and forget about it.  It doesn't affect anything but the IDE coloring scheme.  Wink


RE: Stretch a future keyword or a highlighting bug? - TempodiBasic - 05-12-2025

Thanks @Rhosigma @Steve
I go on ignoring these miscoloring.