Page 1 of 1
EnumerationBinary and PB constants
Posted: Sun May 06, 2018 1:14 pm
by mk-soft
We can change constant of Purebasic
Code: Select all
; #PB_Text_Center = 100 ; Ok
DeclareModule MyModul
; #PB_Text_Center = 100 ; Ok
Enumeration
; #PB_Text_Center ; Ok
EndEnumeration
EnumerationBinary
#PB_Text_Center ; <- No bug message
EndEnumeration
EndDeclareModule
Module MyModul
EndModule
Re: EnumerationBinary and PB constants
Posted: Sun May 06, 2018 1:30 pm
by Bisonte
This is not a bug...
#PB_Text_Center = 1
in your EnumerationBinary, #PB_Text_Center is set to 1
so its the same value and the compiler says nothing.
Re: EnumerationBinary and PB constants
Posted: Sun May 06, 2018 1:45 pm
by TI-994A
Bisonte wrote:...its the same value and the compiler says nothing.
Same behaviour in OS-X;
no error.
Re: EnumerationBinary and PB constants
Posted: Sun May 06, 2018 1:50 pm
by mestnyi
Well, let it not be a mistake, but why the values of the constants are different is not "right", to put it mildly.

Re: EnumerationBinary and PB constants
Posted: Sun May 06, 2018 1:59 pm
by mk-soft
PB constants can change and with different OS also the constants can have different values
Window:
#PB_Text_Center = 1
Mac:
#PB_Text_Center = 2
Linux:
#PB_Text_Center = 2
P.S.
Ok, no bug
an assignment does not make sense that it is not compatible with every OS and should not be used...
No bug with MacOS
Code: Select all
EnumerationBinary 2
#PB_Text_Center
EndEnumeration