[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Question about .substring
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] Question about .substring |
Date: |
Thu, 20 Nov 2014 18:18:32 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> If the colon is given then either or both of the indices can
> be omitted.
I see. So negative indices are a convenience, but index
computation is probably best done using positive indices
because coding the special case would be more awkward:
i = ... (index counting backward)
j = ... (other index counting backward)
if
j == -0
then
b = a[i:]
else
b = a[i:j]
> [) has become the norm in "new" languages?
I wouldn't know. Personally, I think inclusive-inclusive
indexing is more intuitive. (I also favor languages where
an array of length n has indices 1...n, unless explicitly
declared otherwise: "real, dimension(-5:5) :: a".
But I guess that's just me...)
- Re: [Groff] Question about .substring, (continued)
- Re: [Groff] Question about .substring, Steffen Nurpmeso, 2014/11/19
- Re: [Groff] Question about .substring, Ingo Schwarze, 2014/11/19
- Re: [Groff] Question about .substring, Steffen Nurpmeso, 2014/11/19
- Re: [Groff] Question about .substring, Ingo Schwarze, 2014/11/19
- Re: [Groff] Question about .substring, Ralph Corderoy, 2014/11/19
- Re: [Groff] Question about .substring, Steffen Nurpmeso, 2014/11/20
- Re: [Groff] Question about .substring, Ingo Schwarze, 2014/11/20
- Re: [Groff] Question about .substring, Ralph Corderoy, 2014/11/20
- Re: [Groff] Question about .substring, Tadziu Hoffmann, 2014/11/20
- Re: [Groff] Question about .substring, Ralph Corderoy, 2014/11/20
- Re: [Groff] Question about .substring,
Tadziu Hoffmann <=
- Re: [Groff] Question about .substring, Steffen Nurpmeso, 2014/11/28
- Re: [Groff] Question about .substring, Ralph Corderoy, 2014/11/29
- Re: [Groff] Question about .substring, Steffen Nurpmeso, 2014/11/22
- Re: [Groff] Question about .substring, Carsten Kunze, 2014/11/20
- [Groff] .fl (was: Question about .substring), Carsten Kunze, 2014/11/20
- Re: [Groff] Question about .substring, Ralph Corderoy, 2014/11/19
- Re: [Groff] Question about .substring, Ulrich Lauther, 2014/11/19
- Re: [Groff] Question about .substring, Ralph Corderoy, 2014/11/20