What does the “|” in “int style = SWT.APPLICATION_MODAL | SWT.OK;” do (and how to Google it)?

前端 未结 7 775
囚心锁ツ
囚心锁ツ 2021-01-12 23:14

I can\'t search for | in Google. If you had found it in a software source code that you are trying to interpret, you didn\'t know what it does and you couldn\'t ask other pe

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-12 23:27

    Unfortunately, Google is lousy at symbols. Instead, I'd start by looking at the Wikipedia page, and search on there for "|", which is at:

    • bitwise logic (~, &, |, ^)

    and that page has a pretty good overview of what's what and how to use it.

提交回复
热议问题