Made with KolourPaint and screenshots from Kate (with the GitHub theme).

  • bandwidthcrisis@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    5 个月前

    BASIC uses (used?) it to declare variables. (I don’t know if earlier languages did.)

    Not that that’s a reason for other languages to copy it.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        10
        ·
        edit-2
        5 个月前

        Older variants used DIM for arrays and LET for other variables. DIM was originally called that because it was setting the dimensions of the array.

        In modern BASIC variants, DIM has become a backronym: “declare in memory”.

        • sbv@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          6
          arrow-down
          1
          ·
          5 个月前

          In modern BASIC variants, DIM has become a backronym: “declare in memory”.

          TIL. I always thought it was a backronym for declare in (yo) momma.

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          5 个月前

          Even older variants required both a let to declare the variable and a dim to set its size.

          I remember a REDIM command, but I really can’t remember what basic it’s from.

          • dan@upvote.au
            link
            fedilink
            arrow-up
            2
            ·
            5 个月前

            The first programming language I used was Visual Basic (both VBA in Excel, and VB3 then VB6). I think it used redim to resize arrays.