What does the exclamation mark mean in an Objective-C if statement?

前端 未结 7 964
無奈伤痛
無奈伤痛 2020-12-11 09:57

I am wondering what the exclamation mark in if(!anObject) means.

相关标签:
7条回答
  • 2020-12-11 10:39

    As everyone has mention is just a NOT operator, what I believe might have confused you is the brackets [], Objective C, comes from a language called small talk, that uses a send message approach to objects, the brackets are used to send that message. The messages are really functions.

    0 讨论(0)
提交回复
热议问题