The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
The Church disagees. 1BC was followed by 1AD. There was no 0BC/8AD inbetween.
This has been recognized by historicans for decennies, maybe centuries. Today, it is also recognized by all (serious) developers of computer software handling historic data, hereunder genealogical information.
Enjoy it or hate it - your choice! In our office building, our elevator goes directly from floor 1 to floor -1. For our mental comfort, we declared that there is in fact a floor 0 inbetween them, but it is virtual. And since it is virtual, the elevator operating in real space cannot make a stop in virtual space - that is why it skips directly from 1 to -1.
We have learned to live with it. Similarly, you will have to learn with years skipping directly from -1 to 1 without a stop at 0.
The church can't spell and I disagree with it anyway. I live in this world and I can make my own assumptions for my world view. I don't need anyone else to agree with me except when necessary. To be polite, I will agree with other people when necessary.
- I would love to change the world, but they won’t give me the source code.
You also have ground floors. The floors in uncivilized countries are not the ground, it is raised from the ground, usually by a either a layer of concrete or wooden beams, and then a layer of planks above that, usually topped by tiles, carpeting or e.g. a vinyl cover. We prefer that, compared to walking directly on the ground ... even if it less civilized.
VB arrays have an 0th element by default. It's just ignored/skipped by many programmers. The confusion of caused that the DIM statement doesn't actually give the dimension (as the equivalent in C/C++/C# does), but instead the upper limit.
I am not making any assumption. I am starting from the beginning of the array.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
Yet another poorly-worded spec. You definitely need to know which element to start with. It should at least be something along the lines of, "starting with element n, select every mth element".
To cover the variants I can think of at the moment, I would write a method which takes three parameters: the index of the first element to select, how many elements to select from that position, and the number of elements to skip to get to the next element to select.
The ninth element is #55, the eigth is #54... the 1st is #48, the 0th is #47. Fair enough, from a programmer point of view. Your grandmother might disaggree. But as we all know: Today, computer guys rule the world.
In sports games, we still rank the competitors as "1st place", "2nd place" and "3rd place". As soon as computer guys succeed in taking over sports, it most surelu will be changed to "0th place", "1st place" and "2nd place"...
Let's say you're instructed to "get on the highway headed east and drive to the second exit". You don't count the interchange you enter at. Nor do you consider where "exit 2" might be -- you may have entered at exit 2, or it may be to your west.
So "every tenth" has nothing to with how the elements may be indexed, only with which order they're encountered in.
For that matter, does it matter if an array cell is empty? Would those count?