[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Re: .substring bug - indicies don't work as documented(?)
From: |
Bernd Warken |
Subject: |
[Groff] Re: .substring bug - indicies don't work as documented(?) |
Date: |
Sun, 28 Oct 2001 15:08:17 +0100 |
User-agent: |
Mutt/1.2.5i |
On Sun, Oct 28, 2001 at 02:12:33PM +0100, Werner LEMBERG wrote:
> > Languages seem to do it all kinds of ways.
> >
> > % python
> > >>> s = 'abcdefg'
> > >>> s[1]
> > 'b'
> > >>> s[1:1]
> > ''
> > >>> s[1:2]
> > 'b'
> > >>> s[0:2]
> > 'ab'
> > >>> s[-2]
> > 'f'
> > >>> s[-2:]
> > 'fg'
>
> Emacs Lisp's `substring' command behaves identically. I'm more and
> more convinced that it is a good idea to make groff's .substring
> request work similar.
>
> While this is an incompatible change, it is an improvement IMHO. Any
> objections?
>
Agreed, it also like in C. So forget my former mail on positioning.
Bernd Warken