groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Re: .substring bug - indicies don't work as documented(?)


From: Jim Avera
Subject: [Groff] Re: .substring bug - indicies don't work as documented(?)
Date: Sun, 28 Oct 2001 19:16:42 -0800 (PST)

FWIW, I would have guessed that .substring indicies start at zero
(as in C, Perl, etc.).  So I agree. 

Even though I use vi :-)

-Jim

--- Werner LEMBERG <address@hidden> 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'
> 
> 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?
> 
> 
>     Werner


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]