The answer is a question that if (x != nil)matches with if (x).
if (x != nil)
if (x)
But the Apple Documentation says:
Note. When checking for a character, you must explicitly compare it to NULL or zero in the code. You cannot use the negation operator (!) To nullify the address of a character.
Which seems to contradict "Working with Zero" from https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithObjects/WorkingwithObjects.html#//apple_ref/doc/uid/TP40011210- -SW22
, . , :
if (!MyWeakLinkedFunction) { // symbol doesn't exist }
:
if (MyWeakLinkedFunction == NULL) { // symbol doesn't exist }
if (MyWeakLinkedFunction) { // symbol exists }
if (MyWeakLinkedFunction != NULL) { // symbol exists }
, .
NULL .
: ( ), NULL NIL
NULL
NIL
(!), .
, , ( ).
, , , -
. , NULL . (!) , . C . , & myFunction myFunction.
Source: https://habr.com/ru/post/1623024/More articles:Using .Net Objects in a Powershell Class (V5) - .netAndroid - Signed apk not starting on mobile device - androidPrint percent dissimilarity - gitDRF - is it possible to combine several filter parameters in a URL with some logical symbol OR - pythonHow to edit query set filter list - pythonBinding errors while trying to set Google signature - iosHow can I get all the points within a given range depending on its latitude and longitude? - mathHaskell: Как красиво печатать строку без кавычек? - pretty-printSQL Server Hierarchy Unit Column Amount - sql-serverios error "plugin com.swiftkey.SwiftKeyApp.Keyboard is invalid" - iosAll Articles