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 Offline
    M Offline
    Maximilien
    wrote on last edited by
    #1

    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!

    N P K OriginalGriffO V 21 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!

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

      I believe the correct terms are right and wrong.

      speramus in juniperus

      C L 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!

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        Zero based or one based.

        Chill _Maxxx_
        CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

        N 1 Reply Last reply
        0
        • P Pete OHanlon

          Zero based or one based.

          Chill _Maxxx_
          CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

          N Offline
          N Offline
          Nicholas Marty
          wrote on last edited by
          #4

          at least thats what the .NET Framework uses in its documentation ;P

          P 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!

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #5

            "proper" and "annoying" respectively.

            The only instant messaging I do involves my middle finger.

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            K 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!

              K Offline
              K Offline
              Kenneth Haugland
              wrote on last edited by
              #6

              Annoingly Excel or .NET...

              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!

                V Offline
                V Offline
                vonb
                wrote on last edited by
                #7

                Ying and Yang :)

                The signature is in building process.. Please wait...

                M 1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  "proper" and "annoying" respectively.

                  The only instant messaging I do involves my middle finger.

                  K Offline
                  K Offline
                  Kenneth Haugland
                  wrote on last edited by
                  #8

                  Like showing the ring finger instead of the middle finger :laugh:

                  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!

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

                    Maximilien wrote:

                    "0-based array" and "1 based array"

                    That's about right.

                    Maximilien wrote:

                    1 (e.g. pascal)

                    Pascal allows you to specify the range. And with OOP you can define a class that implements arbitrary indexing, e.g. new MyArray ( -5 , 10 ) .

                    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
                      #10

                      Yes.

                      1 Reply Last reply
                      0
                      • V vonb

                        Ying and Yang :)

                        The signature is in building process.. Please wait...

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

                        Yin and Yang :-O

                        V L 2 Replies Last reply
                        0
                        • M MarkTJohnson

                          Yin and Yang :-O

                          V Offline
                          V Offline
                          vonb
                          wrote on last edited by
                          #12

                          My Chineese spelling is not so good... But Ying and Yang exist, it's a music band (Hip Hop duo) https://www.google.ch/#q=ying+yang+twins&safe=images[^]

                          The signature is in building process.. Please wait...

                          1 Reply Last reply
                          0
                          • N Nicholas Marty

                            at least thats what the .NET Framework uses in its documentation ;P

                            P Offline
                            P Offline
                            Pete OHanlon
                            wrote on last edited by
                            #13

                            Wimp. Real coders don't read documentation. ;P

                            Chill _Maxxx_
                            CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                            N 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!

                              E Offline
                              E Offline
                              Espen Harlinn
                              wrote on last edited by
                              #14

                              In a separate millenium I wrote a 1 based C++ string class - I think that was the best argument for zero based code I've ever seen.

                              Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                              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!

                                E Offline
                                E Offline
                                Eytukan
                                wrote on last edited by
                                #15

                                '0' based one- Just called it Orray. :-D

                                Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

                                1 Reply Last reply
                                0
                                • P Pete OHanlon

                                  Wimp. Real coders don't read documentation. ;P

                                  Chill _Maxxx_
                                  CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                                  N Offline
                                  N Offline
                                  Nicholas Marty
                                  wrote on last edited by
                                  #16

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

                                  N L S 3 Replies Last reply
                                  0
                                  • 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
                                          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