[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] .substring
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] .substring |
Date: |
Wed, 26 Jun 2002 12:52:37 +0200 (CEST) |
> I remember that .substring was intended to become more compatible to
> whatever. It seems that this did not happen so far. It still has
> the first character as of index 1 and the last one as of index 0. I
> do not know about any other language with such a behavior.
>
> C and Python use index 0 and -1 as the first and last index resp.,
> and a range is determined by the `before' idiom. This is not
> comfortable to everyday thinking, but is quite handy once you got
> used to it - and it is the standard for a host of languages.
It's on my TODO list, but until now I wasn't in the mood to fix
that... Any help highly appreciated (this mainly means to check all
packages which use .substring, update the docs, etc.).
> The documentation of the first argument for .substring sounds a bit
> strange to me. When using .substring the name of a string is
> passed, not a register. Maybe some register shows up internally,
> but you cannot pass some of your registers to this request.
Fixed, thanks.
Werner