groff
[Top][All Lists]
Advanced

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

Re: [Groff] changed .substring


From: Bernd Warken
Subject: Re: [Groff] changed .substring
Date: Sat, 13 Jul 2002 21:03:34 +0200
User-agent: Mutt/1.2.5i

On Fri, Jul 12, 2002 at 04:17:02AM +0200, Werner LEMBERG wrote:
> > 
> > More exactly, I propose to identify `.substring s n' with 
> > `.substring s n n' instead of the actual `.substring s n -1'.
> 
> I don't have an opinion here.  For me, both Bernd's suggestion
> (resembling Python) and the current implementation (resembling Elisp)
> make sense.
> 
Maybe we should require .substring to have 3 arguments.  This would
not have an impact on functionality, but would remove unclear usages.

`.substring s n n'    means the character at index `n' of string s.
`.substring s n -1'   means the substring from index `n' up to the end of 
                      the string s.
`.substring s n'      raises and error.

Bernd Warken


reply via email to

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