LoginSignup
0
0

|=演算子

Posted at

flag |= false
flag = flag | false

trueがあったらtrue

true * true = true
true * false = true
false * true = true
false * false = false

flagを使い分けて、状態を分ける

defalt_flag = false
flag = default_flag
default_flag |=  hoge.include?("hoge")
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0