Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Do index ranges HAVE to start at 1?

index ranges
0
Posted

Do index ranges HAVE to start at 1?

0

A I’m going to show you my reasoning on this one, and the tirade is going to last a while, so let me say that there *is* a Yorick programming trick that might work for you. I assume that the subtext of your complaint is that you do a lot of ffts, and you want to index from -n to n. Or that occasionally you want an index origin of 0. Yorick allows zero and negative indices in many (but not all) situations. Index zero means the last element of an array, and negative indices count backwards from that last element, so -1 is the next to last, -2 is before that, and so on.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123