Skip to content

Instantly share code, notes, and snippets.

@To1ne

To1ne/nil.md

Last active Jan 1, 2016
Embed
What would you like to do?
NULL, nil, null, undef

C/C++

void* a = NULL; // not sure about all compiler

C++11

void* a = nullptr;

Objective C

id a = nil;

C#

object a = null;

Ruby

a = nil

Perl

my $a = undef;

Python

a = None

Javascript

var a = undefined;

VB

Dim a as Integer
a = Nothing

Java

Integer a = null;

Shell

a=

Lisp

(setq a nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.