QB64 Phoenix Edition
$NoPrefix - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: Chatting and Socializing (https://staging.qb64phoenix.com/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://staging.qb64phoenix.com/forumdisplay.php?fid=2)
+--- Thread: $NoPrefix (/showthread.php?tid=1563)



$NoPrefix - Petr - 03-20-2023

Hi, I found that if I use $NoPrefix, I just don't mess with OpenGL. Maybe it comes from the fact that OpenGL commands have the underscore in their original wording. So now the question is. Can the underscore removal be disabled in the _GL sub?


RE: $NoPrefix - mnrvovrfc - 03-23-2023

Hmmm, nobody else knows? I would like to know too.

The problem is Galleon chose a name that was as short and easy to remember as possible for the "user function" to play around with OpenGL. But without underscore it's just "GL" which is a variable in a bunch of old BASIC programs for interpreters recognizing at least two distinct letters as a variable name. There is opposition to "CALL GL" many years after "CALL CLEAR" on Texas Instruments cartridge BASIC LOL, but there was no choice with the latter to clear the screen because there was no dedicated button for it.

Could have been called "GLMAIN" or "GL_MAIN" instead to manage it better.


RE: $NoPrefix - RhoSigma - 03-23-2023

It's simply as per the $NOPREFIX Wiki page (4th list entry) "SUB _GL still must be prefixed."

It has been that way since $NOPREFIX was first introduced in v1.4.
As Fellippe/Luke did implement $NOPREFIX long after SUB _GL was introduced I'm pretty sure they also looked for a way to remove the underscore from _GL as well, but had to conclude it would be counterproductive at that point and decided to keep the underscore for SUB _GL, even if $NOPREFIX is used.