I wrote this:
if( a == -11 && b == -1 ){
{
if( a == -1) AND ( b == -1)...
But neither work, and I have the same problem with OR
. How do I write expressions that include OR
or AND
?
If your phone is in Airplane mode, you won't be able to make calls from your watch. Try disconnecting Bluetooth on your phone so the watch doesn't know your phone is in Airplane mode.
Make calls from apps on your MacIn the FaceTime app on your Mac, sign in and make sure FaceTime is turned on. Set up your iPhone and Mac for phone calls, if you haven't done so already. to choose the phone number to call.
On your iPhone, go to Settings > Phone > Calls on Other Devices, then turn on Allow Calls on Other Devices. On your iPad or iPod touch, go to Settings > FaceTime, then turn on Calls from iPhone. On your Mac, open the FaceTime app, then choose FaceTime > Preferences. Click Settings, then select Calls From iPhone.
You use &&
for “and”, and ||
for “or”.
(a == -11 && b == -1)
is fine and correct. Objective-C uses all of the same logical operators as C. ||
is the logical-or operator.
if (a==-11 && b==-1) {
if perfectly legal in C, and therefore Objective-C.
Your second example is not C or Objective-C
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With