Skip to content

Instantly share code, notes, and snippets.

@agiliq
Created July 15, 2009 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agiliq/147906 to your computer and use it in GitHub Desktop.
Save agiliq/147906 to your computer and use it in GitHub Desktop.
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> print(nil)
nil
> print(nil > 10)
stdin:1: attempt to compare number with nil
stack traceback:
stdin:1: in main chunk
[C]: ?
> print(nil < 10)
stdin:1: attempt to compare nil with number
stack traceback:
stdin:1: in main chunk
[C]: ?
> print(nil == 10)
false
> print(nil == nil)
true
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment