The difference is that while NULL represents zero for any pointer, nil is specific to objects (e.g., id) and Nil is specific to class pointers.
- nil : 正常來說,它所指的是一個物件對象,而這個對象的指標指向空 Empty。
- Nil : 用來區別所指向的對象是一個類別 Class 而非物件。
- NULL : 任何指向空值的指標 ( 可以想成當成一個數值來使用 )。
沒有留言:
張貼留言