Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. What to call array indexing starting at 0 vs. 1 ?

What to call array indexing starting at 0 vs. 1 ?

Scheduled Pinned Locked Moved The Lounge
c++delphidatabasevisual-studiodata-structures
70 Posts 36 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M MarkTJohnson

    Yin and Yang :-O

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #17

    The spelling is inbalanced? That seems fundamentally wrong..

    M 1 Reply Last reply
    0
    • L Lost User

      The spelling is inbalanced? That seems fundamentally wrong..

      M Offline
      M Offline
      MarkTJohnson
      wrote on last edited by
      #18

      It's an imperfect world, screws fall out all the time.

      1 Reply Last reply
      0
      • N Nicholas Marty

        I only have seen that in the Intellisense popup of some .NET function. Intellisense is all the documentation that I need. :laugh:

        N Offline
        N Offline
        Nagy Vilmos
        wrote on last edited by
        #19

        Meh! Real men code with edlin.

        speramus in juniperus

        R pkfoxP G J F 8 Replies Last reply
        0
        • N Nagy Vilmos

          Meh! Real men code with edlin.

          speramus in juniperus

          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #20

          Emacs. /ravi

          My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

          E 1 Reply Last reply
          0
          • M Maximilien

            Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.

            I'd rather be phishing!

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #21

            Maximilien wrote:

            Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ?

            The term is "array", and they start at index 0. There's a difference when talking about strings, not arrays.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

            1 Reply Last reply
            0
            • M Maximilien

              Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.

              I'd rather be phishing!

              G Offline
              G Offline
              glennPattonWork3
              wrote on last edited by
              #22

              Standard & Mutant ? why was Pascal 1 based? anyone know if Delphi is has one based arrays as it might explain some error generated by a test application I have to use?

              L 1 Reply Last reply
              0
              • N Nagy Vilmos

                Meh! Real men code with edlin.

                speramus in juniperus

                pkfoxP Offline
                pkfoxP Offline
                pkfox
                wrote on last edited by
                #23

                Real men code with Emacs and vi.

                We can’t stop here, this is bat country - Hunter S Thompson RIP

                P P 2 Replies Last reply
                0
                • M Maximilien

                  Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.

                  I'd rather be phishing!

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #24

                  Let's call them Zeray and Oneray.

                  1 Reply Last reply
                  0
                  • M Maximilien

                    Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.

                    I'd rather be phishing!

                    R Offline
                    R Offline
                    Ravi Bhavnani
                    wrote on last edited by
                    #25

                    Yes, zero-based and one-based indexing are correct terms. /ravi

                    My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                    1 Reply Last reply
                    0
                    • G glennPattonWork3

                      Standard & Mutant ? why was Pascal 1 based? anyone know if Delphi is has one based arrays as it might explain some error generated by a test application I have to use?

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #26

                      glennPattonWork wrote:

                      why was Pascal 1 based?

                      It's not, neither is Object-Pascal (Delphi). The type-definition of an array would contain the start-index and the end-index. One would use 0, obviously. Dynamic arrays start at 0. Even BASIC[^] starts at 0.

                      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                      1 Reply Last reply
                      0
                      • N Nagy Vilmos

                        Meh! Real men code with edlin.

                        speramus in juniperus

                        G Offline
                        G Offline
                        Gary Wheeler
                        wrote on last edited by
                        #27

                        Real men code by staring intently at their powered-off, disconnected hard drive and visualize the magnetic bits into their proper alignment.

                        Software Zen: delete this;

                        1 Reply Last reply
                        0
                        • N Nagy Vilmos

                          Meh! Real men code with edlin.

                          speramus in juniperus

                          J Offline
                          J Offline
                          jeron1
                          wrote on last edited by
                          #28

                          Nagy Vilmos wrote:

                          Real men code with edlin.

                          I said something like this to a younger colleague a few weeks ago, I got a 'deer in headlight' look as a response. God I'm old :(( .

                          1 Reply Last reply
                          0
                          • N Nagy Vilmos

                            Meh! Real men code with edlin.

                            speramus in juniperus

                            F Offline
                            F Offline
                            Forogar
                            wrote on last edited by
                            #29

                            Quote:

                            Real men code with edlin.

                            oh yeah!

                            - I would love to change the world, but they won’t give me the source code.

                            1 Reply Last reply
                            0
                            • N Nagy Vilmos

                              I believe the correct terms are right and wrong.

                              speramus in juniperus

                              C Offline
                              C Offline
                              CPallini
                              wrote on last edited by
                              #30

                              That was true before Lua appeared.

                              Veni, vidi, vici.

                              1 Reply Last reply
                              0
                              • M Maximilien

                                Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.

                                I'd rather be phishing!

                                C Offline
                                C Offline
                                CPallini
                                wrote on last edited by
                                #31

                                Maximilien wrote:

                                Is it simply "0-based array" and "1-based array" ?

                                Yes.

                                Veni, vidi, vici.

                                1 Reply Last reply
                                0
                                • N Nicholas Marty

                                  I only have seen that in the Intellisense popup of some .NET function. Intellisense is all the documentation that I need. :laugh:

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #32

                                  Nicholas Marty wrote:

                                  Intellisense is all the documentation that I need.

                                  :~

                                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                                  1 Reply Last reply
                                  0
                                  • pkfoxP pkfox

                                    Real men code with Emacs and vi.

                                    We can’t stop here, this is bat country - Hunter S Thompson RIP

                                    P Offline
                                    P Offline
                                    PIEBALDconsult
                                    wrote on last edited by
                                    #33

                                    EDT

                                    C R R 3 Replies Last reply
                                    0
                                    • M Maximilien

                                      Is there a technical term to say if an array starts at index 0 (e.g. C/C++) or 1 (e.g. pascal) ? Is it simply "0-based array" and "1 based array" ? Thanks.

                                      I'd rather be phishing!

                                      B Offline
                                      B Offline
                                      BillWoodruff
                                      wrote on last edited by
                                      #34

                                      (0) The one true path to direct epiphanic experience of ineffable ecstasy in emptiness. (1) The Mother of All Lies, the Deceiver, the Abomination which is the Canker that rots the Soul from within. bill

                                      Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview

                                      pkfoxP 1 Reply Last reply
                                      0
                                      • B BillWoodruff

                                        (0) The one true path to direct epiphanic experience of ineffable ecstasy in emptiness. (1) The Mother of All Lies, the Deceiver, the Abomination which is the Canker that rots the Soul from within. bill

                                        Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview

                                        pkfoxP Offline
                                        pkfoxP Offline
                                        pkfox
                                        wrote on last edited by
                                        #35

                                        Scary stuff Bill :thumbsup:

                                        We can’t stop here, this is bat country - Hunter S Thompson RIP

                                        1 Reply Last reply
                                        0
                                        • pkfoxP pkfox

                                          Real men code with Emacs and vi.

                                          We can’t stop here, this is bat country - Hunter S Thompson RIP

                                          P Offline
                                          P Offline
                                          parths
                                          wrote on last edited by
                                          #36

                                          I'm surprised no put thought of putting the obligatory XKCD[^] yet

                                          "It was when I found out I could make mistakes that I knew I was on to something." -Ornette Coleman "Philosophy is a study that lets us be unhappy more intelligently." -Anon.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups