Re: Replacement for "<" in array ranges?

2019-03-01 Thread Araq
`..<` still works and is encouraged except that it never worked inside `array` declarations and a simple rewrite into `N-1` in the compiler turned out to be difficult so for now at least it produces a clean error message.

Re: Replacement for "<" in array ranges?

2019-02-28 Thread cdunn2001
Fortunately, `array[n, int]` _is_ 0-based, so that will work fine for me in this case. I would not be happy with array[0 .. (n-1), int]. > (Not to mention that most people prefer 'A'..'Z' over 'A'..<'Z'+1.) I prefer `range(26, 'A')`. When you provide both length and start-point, there is

Re: Replacement for "<" in array ranges?

2019-02-25 Thread Araq
> Be aware of Djikstra's opinion on ranges: > > [https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html](https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html) Oh not that again. Exclusive ranges ONLY work when you have a sentinel value that shouldn't be

Re: Replacement for "<" in array ranges?

2019-02-25 Thread miran
Use this: array[MSA_BASE_GROUP_LEN, align_tag_col_t] Run

Replacement for "<" in array ranges?

2019-02-25 Thread cdunn2001
(This is difficult to search for, so I thought I should ask the question.) I see this warning: .nim(101, 23) Warning: < is deprecated [Deprecated] base*: array[0 ..