Skip to content

Instantly share code, notes, and snippets.

@To1ne
Last active January 1, 2016 23:28
Show Gist options
  • Save To1ne/8216332 to your computer and use it in GitHub Desktop.
Save To1ne/8216332 to your computer and use it in GitHub Desktop.
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