• RandomBit@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    In C/C++, undefined should be the meme of the little girl smiling while the house burns down behind her.

    • nintendiator@feddit.cl
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      In C. In C++, the image is zalgoified, corrupted, cropped, lens flared, color-inverted, and for some reason converted to Targa file format.

  • Speiser0@feddit.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    I see how you censored at “undefined”. Thanks. The actual value could easily kill anyone who sees it.

    • ipkpjersi@lemmy.one
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Depends on the programming language. In JavaScript, it literally means that like the key or variable does not actually exist. Whereas like in C/C++, writing random bytes to random memory addresses would result in “undefined behaviour” which means basically anything could happen.

      • crystal@feddit.de
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        1 year ago

        In Javascript you can do let a = undefined, defining the variale a as undefined.

        A significant difference to defining it as null is that typeof null == "object", while typeof undefined == "undefined".