I wrote this:
if( a == -11 && b == -1 ){ { if( a == -1) AND ( b == -1)...
But it does not work, and I have the same problem with OR . How to write expressions containing OR or AND ?
OR
AND
You use && for "and" and || for "or."
&&
||
(a == -11 && b == -1) excellent and correct. Objective-C uses the same logical operators as C. || - logical or operator.
(a == -11 && b == -1)
if (a==-11 && b==-1) {
if it is completely legal in C, and therefore Objective-C.
The second example is not C or Objective-C
Source: https://habr.com/ru/post/888964/More articles:Turn off in-app purchases? - iphoneHow to click a link that has javascript: __ doPostBack in href? - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/888961/handled-routedevent-continues-to-bubble-up-tree&usg=ALkJrhjp5Zt63GiOHxymzx-NMuQFuG9RXAWPF TreeView, get TreeViewItem in the PreviewMouseDown event - wpfHow can I add WCF client endpoints programmatically? - wcfAdding Icon@2x.png to SVN - svnWhy are my MongoDB logs populated with "getmore local.oplog.rs"? - loggingSqlAlchemy: check if one object is in any relationship (or_ (object.relationship1.contains (otherObject), object.relationship2.contains (otherObject)) - pythonCreating a timer using Lua - luaHow to get a subset of a DataFrame that has only elements that appear in a set more than once in R - rAll Articles