From Test-Scratch-Wiki

() ve ()
2.0 () and ().png
Category Operators
Type Boolean

() ve () bloğu bir Operatörler bloğu ve bir Boolean block. The block joins two boolean blocks so they both have to be true to return true. If they are both true, the block returns true; if they are not all true or none true, it returns false.

This block can be stacked inside itself, which can be used to test more conditions.

Örnek Kullanımları

This block is used for checking if two or more conditions are true at the same time. Some cases of this are:

  • Lose health if "I'm touching the fire and I do not have my shield up."
sürekli tekrarla 
  eğer <<[#f48302] rengine dokunuyor mu?> ve <<(kostüm #) = [2]> değil>> ise 
    [can v] i (-1) kadar değiştir
  end
end
  • Say a button is clicked if the mouse is touching it and the mouse is down.
sürekli tekrarla 
  <<fareye basılı mı?> ve <[mouse-pointer v] değiyor mu?>> de
end

Workaround

Main article: List of Block Workarounds


This block can be replicated with the following code:

<<<<koşul1> değil> veya <<koşul2> değil>> değil>

Another way to replicate this block is:

[ve v] i [hayır] yap
eğer <koşul1> ise 
  eğer <koşul2> ise 
    [ve v] i [evet] yap
  end
end

Ayrıca Bakınız

Template:Operatörler Blokları

Cookies help us deliver our services. By using our services, you agree to our use of cookies.