How to find out, if a style is included?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by crono.

Hello folks,
how do i find out, if there is a style already included?

example:
style = $80800000
wanna test = $20
this should return 'false' because this style is not there...

style = $80800000
wanna test = $800000
now it should return 'true'

Thanks 4 the help ^^

kind regards,
Alexander Schoenfeld

Email: [url]mailto:alexander.schoenfeld@chronologic.de[/url]
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Pupil.
Originally posted by crono

Hello folks,
how do i find out, if there is a style already included?

example:
style = $80800000
wanna test = $20
this should return 'false' because this style is not there...

style = $80800000
wanna test = $800000
now it should return 'true'
You can use the bitwise AND operator (i.e. '&'), see manual for more info.

Code: Select all

style = $80800000
test = $800000
If style & test
  Debug "True"
Else
  Debug "False"
EndIf
Post Reply