Hi folks,
I'm new to GLBasic and these forums so I'm sad to report that PLATFORMINFO$ doesn't seem to work as implied in the documentation and will only return empty strings regardless of whatever parameter I pass to it. I have the latest GLBasic version of 10.283 and I have GLBasic installed on Win7 (32bit).
Here's my code snippet for you to look at just in case it's me that's doing something wrong...
// --------------------------------- //
// Project: TestApp
// Start: Tuesday, January 01, 2013
// IDE Version: 10.283
GLOBAL gPlatform$
GLOBAL gSavePath$
GLOBAL gDocsPath$
GLOBAL gTempPath$
gPlatform$=PLATFORMINFO$("")
gSavePath$=PLATFORMINFO$("APPDATA")
gDocsPath$=PLATFORMINFO$("DOCUMENTS")
gTempPath$=PLATFORMINFO$("TEMP")
Any help would be very much appreciated. Thanks.
Eh? Sorry I've just got home after a Night shift and have been up for over 24 hours now, so my brain might be a bit muddled.
GLOBAL gPlatform$
GLOBAL gSavePath$
GLOBAL gDocsPath$
GLOBAL gTempPath$
gPlatform$=PLATFORMINFO$("")
gSavePath$=PLATFORMINFO$("APPDATA")
gDocsPath$=PLATFORMINFO$("DOCUMENTS")
gTempPath$=PLATFORMINFO$("TEMP")
PRINT gSavePath$,10,10
PRINT gDocsPath$,10,20
PRINT gTempPath$,10,30
SHOWSCREEN
KEYWAIT
They all perform exactly as I would expect. You don't pass strings TO them, you get strings FROM them to use to do various things.
What exactly are you trying to achieve?
Hi Ian,
Thanks for your reply. I've tested your code snippet and it works fine for me too.
Previously I'd set a breakpoint pretty much where your PRINT statement would be and the debugger falsely reports the strings returned as empty. I think the bug report still stands although it seems to be a debugging issue.
Thanks for your help.
If you don't use a variable, the compiler (GCC) can optimize the code and eliminate the variable calculation.
Yes, it does seem that the debugger is displaying empty text (when it shouldn't) :
[attachment deleted by admin]
I've edited the title, as it does indeed appear to be an issue with the debugger alone and not a general bug which the original post appeared to indicate.
Yes, its rather an odd problem...
Quote from: MrTAToad on 2013-Jan-23
Yes, it does seem that the debugger is displaying empty text (when it shouldn't) :
In my GLB version 10.283 works ok the debugger. ¿Do you use the v11?
Yes, forgot to mention that... Must be a newly acquired bug :)
Quote from: MrTAToad on 2013-Jan-24
Yes, forgot to mention that... Must be a newly acquired bug :)
The bug is present in version 10.283.
Indeed it is!