Page 1 of 1

Compiler constant exists multiple times

Posted: Wed Feb 01, 2012 8:30 pm
by uwekel
Hi,

today i noticed that the compiler constant, which i declared recently, was stored at the end of the document for multiple times. It looked like this:

Code: Select all

; IDE Options = PureBasic 4.61 Beta 1 (Linux - x64)
; CursorPosition = 894
; FirstLine = 153
; Folding = AAAAwBA9
; EnableXP
; CPU = 5
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
; Constant = #Self=1
...
I wouldn't have noticed it if the IDE wouln't crashed at startup. Only by renaming the sourcecode folder I was able to start the IDE again. The error was caused by the autoload of the related document. I am not sure whether it is a specific Linux problem. After removing the surplus lines, the document could be loaded and the IDE did not crash again.

I am using the same source code on Linux and Windows. The compiler constant is used to execute some codelines if a modul runs by itself (#Self=1), but not, if it is embedded in a project (#Self=0).

Best regards,
Uwe

Re: Compiler constant exists multiple times

Posted: Fri Feb 03, 2012 8:59 pm
by uwekel
Hi,

you can even see it at the compiler options dialog:
Image

Best regards
Uwe

Re: Compiler constant exists multiple times

Posted: Mon Feb 27, 2012 8:08 pm
by uwekel
Hi,

Today i found out that this wrong behaviour happens if the code was handed over to a user tool and reloaded after the tool has finished. The plugin is a self-written one and does not generates the duplicate lines. The problem does also occur on Windows.

Best regards
Uwe