A vitally important part of nearly any programming language. While computer programs normally think in terms of particular values, sometimes you need to express the lack of a value.

This sort of effect can be kludged via magic numbers like -1 or other arbitary values, but it's better if your language of choice does it internally, eliminating any possible ambiguity.

Some languages such as Perl give it different names, like undef. Semantically this suits better in a situation where you want to express the lack of a value, while null in a C context generally indicates a meaningless value.

NULL is nothing. It is useful because of this. Programmers swear by it (and at it, as far as that goes).
Null is a macro equal to 0. It is guaranteed to be unequal to any pointer or value (unless that value is also equal to NULL).

See also: pointers, code, and C.

In a SQL database: a record that contains no value at all, not even an empty string.

In a (relational) database, NULL indicates that a field does not have a value.

Usual arithmetic rules do not apply to NULL values:

  • Almost all calculations involving NULL values gives NULL as result, for example 5 + NULL has the result NULL. String concatenation does not always work this way, for example the Oracle operator for concatenating strings, ||, treats NULL as an empty string.
  • No value is equal to NULL, not even NULL itself! Therefore there is a special <value> IS NULL operator that is used to test for NULL values.

Note: On some database servers, for example Oracle 8, an empty string is equal to null, but on others, for example Microsoft SQL Server, an empty string is not equal to null (but that is configurable, IIRC).

When you play spades, null is when you can't get any books. At the end of that round, if you didn't get any books you are rewarded 100 points. If you do get books then 100 points are taken away from your score. Going null is a great way to come back in a spades game.

Null (?), a. [L. nullus not any, none; ne not + ullus any, a dim. of unus one; cf. F. nul. See No, and One, and cf. None.]

Of no legal or binding force or validity; of no efficacy; invalid; void; nugatory; useless.

Faultily faultless, icily regular, splendidly null, Dead perfection; no more. Tennyson.

 

© Webster 1913.


Null, n.

1.

Something that has no force or meaning.

2.

That which has no value; a cipher; zero.

Bacon.

Null method Physics., a zero method. See under Zero.

 

© Webster 1913.


Null, v. t. [From null, a., or perh. abbrev. from annul.]

To annul.

[Obs.]

Milton.

 

© Webster 1913.


Null, n. [Etymol. uncertain.]

One of the beads in nulled work.

 

© Webster 1913.

Log in or register to write something here or to contact authors.