EnumerationBinary and PB constants

Just starting out? Need help? Post your questions and find answers here.
User avatar
mk-soft
Always Here
Always Here
Posts: 5386
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

EnumerationBinary and PB constants

Post 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
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Bisonte
Addict
Addict
Posts: 1232
Joined: Tue Oct 09, 2007 2:15 am

Re: EnumerationBinary and PB constants

Post 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.
PureBasic 6.10 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: EnumerationBinary and PB constants

Post by TI-994A »

Bisonte wrote:...its the same value and the compiler says nothing.
Same behaviour in OS-X; no error.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
mestnyi
Addict
Addict
Posts: 999
Joined: Mon Nov 25, 2013 6:41 am

Re: EnumerationBinary and PB constants

Post 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. :)
User avatar
mk-soft
Always Here
Always Here
Posts: 5386
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: EnumerationBinary and PB constants

Post 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 :mrgreen:

Code: Select all

  EnumerationBinary 2
    #PB_Text_Center
  EndEnumeration
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply