I was working on some test code and found that a word variable doesn't like to hold backslashes.
In example:
textvariable$ = "\"
It didn't matter if it was mixed in with other characters either.
The compiler returned this:
C:\Program Files\GLBasic\Compiler\platform\gpc_temp.cpp:32: unterminated string or character constant
C:\Program Files\GLBasic\Compiler\platform\gpc_temp.cpp:17: possible real start of unterminated constant
Is this a bug or just a reserved character for the compiler?
No, it's correct:
\" is the escape sequence for the " character. So you should write:
textvariable$="\"" // for a "
textvariable$="\\" for a \
Ah, ok. That makes sense. Thanks for the fast reply!