Skip to content

Instantly share code, notes, and snippets.

@pbrewczynski
Created December 16, 2013 07:56
Show Gist options
  • Save pbrewczynski/7983679 to your computer and use it in GitHub Desktop.
Save pbrewczynski/7983679 to your computer and use it in GitHub Desktop.
//
// main.m
// NilTestCount
//
// Created by Paweł on 16/12/13.
// Copyright (c) 2013 Twigit. All rights reserved.
//
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
NSArray *a;
if([a count] == 0) {
NSLog(@"I could think that my NSArray is just empty array, but it is nil!");
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment