Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A little IDE color glitch maybe
#1
No big deal, but thought I'd mention this in case it could reveal a greater IDE syntax coloring issue. 

I noticed that the IDE doesn't correctly color the name of a SUB or FUNCTION named smooth for some reason.  Load this in the current IDE to see.

- Dav

Code: (Select All)
Function smooth: End Function 'Not colored
Function smoothy: End Function 'colored

Sub smooth: End Sub 'not colored
Sub smoothy: End Sub 'colored

Find my programs here in Dav's QB64 Corner
Reply
#2
This might go away with the next release.   _SMOOTH can be used in conjecture with some keywords ($RESIZE: _SMOOTH comes to the top of my head), and with $NOPREFIX in play, that would make SMOOTH a keyword.  (Which is why you'd see it in blue.)

Since NoPrefix is going away, this might go away as well in the next release.  

Just add it as another one of those reasons why I'm glad to see $NoPrefix fading out into the sunset.  Big Grin
Reply
#3
_SMOOTH is an attribute to _ALLOWFULLSCREEN and _FULLSCREEN, respectively it's also a function to query the current setting. Well, those are all underscored, but SMOOTH (w/o "_") is used in the $RESIZE:SMOOTH directive. As this remains the same even without $NOPREFIX, the coloring issue will remain too.

Fact: SMOOTH is an internal keyword and will be highlighted as such.

But thanks to the $NOPREFIX deprecation it will never be an invalid function name anymore, write a $NOPREFIX above your code snippet above and the IDE should immediately complain about it.
Reply




Users browsing this thread: 2 Guest(s)