Nothing Data Type

Programming Fundamentals · Wikibooks

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From Wikibooks, under CC BY-SA 4.0, as the source states it. This page at Wikibooks.

    Nothing Data Type

    Overview

    A nothing data type is a feature of some programming languages which allow the setting of a special value to indicate a missing or uninitialized value rather than using the value 0 (zero).[1]

    Discussion

    Most programming languages support the use of a reserved word or words to represent missing, uninitialized, or invalid values.

    Language Reserved Word Meaning
    C++ null no value
    C# null no value
    Java null no value
    JavaScript null no value
    JavaScript NaN Not a Number
    Python None no value
    Swift nil no value

    Key Terms

    NaN
    Reserved word used to indicate a non-numeric value in a numeric variable.
    Null
    Reserved word used to represent a missing value or invalid value.

    References