开发者

How do I express the "OR" logic operator in Objective-C?

开发者 https://www.devze.com 2023-03-30 05:29 出处:网络
Let\'s say that I want to check that one of two terms are effective, how do I express it? if (value == 1 **--OR--** value 开发者_如何学C== nil) {

Let's say that I want to check that one of two terms are effective, how do I express it?

if (value == 1 **--OR--** value 开发者_如何学C== nil) {
    do something;
}


||

eg: if (value == 1 || value == nil)

0

精彩评论

暂无评论...
验证码 换一张
取 消