29

Are nil and null interchangeable? For example,

My bank a/c has a nil balance.

My bank a/c has a null balance.

6 Answers6

17

NULL is used in computing most often (always?) to signify "not a value." This is different than zero: in a bank database, a zero value means no money, while a NULL value means there has been no value assigned to the balance.

This is a specialized usage, but increasingly common as more people learn to program.

horatio
  • 4,002
  • 1
    I use the word null just about daily in computer programming. It is extremely common for anyone creating software. – sourcenouveau Sep 09 '14 at 12:31
  • 6
    You forgot to add that 'null' and 'nil' are identical in programming; exact usage simply depends on which one a language has chosen to standardize on. – RonLugge Dec 14 '14 at 05:04
  • 1
    If you're writing in C, NULL is interchangeable with the value 0, though this isn't recommended – dreadiscool May 31 '16 at 20:22
  • 3
    @dreadiscool it's not in general interchangeable. A conformant implementation may define it as ((void*)0) (which many do), which you then can't use in e.g. arithmetic: 5*NULL will give you a compilation error. – Ruslan Jul 09 '17 at 09:29
12

Nil means zero or nought

Null means nothing or empty

In everyday life, we tend to treat these terms as equivalent. But it is sometimes important to differentiate between them. (E.g. when working with SQL database data)

haha
  • 2,354
user3756336
  • 121
  • 1
  • 2
12

Almost the only time you hear or see null is in the legal expression ‘null and void’, while nil normally indicates that a football team has scored no goals. If the bottom line of your bank statement shows neither a credit nor a debit, what you have is a zero balance.

Barrie England
  • 140,205
  • i dunno about other countries. But in India, here banks provide a special a/c i.e, no-frills a/c. and that is often called as null balance a/c, nil balance a/c, zero balance a/c. – Vijin Paulraj Mar 16 '12 at 08:16
  • 3
    As a side note, nil is rarely used in the U.S. for sports scores; nothing is used far more often (or, in place of nothing, one might hear zero, or even zip). The one exception I hear is when ardent soccer fans are discussing a soccer match ("Spain beat Portugal 2-0," [pronounced "two-nil"]; but, "The Falcons beat the Seahawks 10-0," [pronounced "ten-nothing"]). As a side note to my side note, very ardent soccer fans will refer to soccer as "real football." :^) – J.R. Mar 16 '12 at 08:32
  • A good example then, @Vijin, of Indian English, but I don't quite understand how a bank can offer a zero balance account. The whole point of a bank account, surely, is either to have a plus or a minus balance. – Barrie England Mar 16 '12 at 08:42
  • @BarrieEngland, http://wiki.answers.com/Q/What_is_no_frills_account the above mentioned a/c is called nil,null,zero balance a/c – Vijin Paulraj Mar 16 '12 at 09:04
11

Null is also used in mathematics (a null set) and science (null hypothesis). I can't think of a time when nil is used in those areas.

Etymologically, null is from French, and nil is from Latin.

JLG
  • 23,238
6

Null is also used in physics and electronics. Here's a description of a Null comparator using a Wheatstone bridge. Null tends to describe something with no net value, but possibly the sum of large values of opposing signs, while nil implies a value of 0.

-1

Nil means no less than or greater than 0 and null means no value in variable or any storage media

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community Oct 28 '22 at 10:28