[Top][All Lists]
[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: |
Thu, 11 Jul 2002 10:41:40 +0200 |
User-agent: |
Mutt/1.2.5i |
.substring does not test range violations. If indexes are out of range
the string is not altered; this is not wanted.
The following behavior is used with other languages:
1) Referring an index before the first or after the last character
should produce an error (>=length or <-length).
.ds s abc
.substring s 3 3 \" should be an error
.substring s -4 -4 \" should be an error
2) If the first argument points to an index after the index retrieved
from the second argument the result should be the empty string.
.ds s abc
.substring s 2 1 \" s should become empty
.substring s -1 -2 \" s should become empty
.substring s 2 -2 \" s should become empty
Bernd Warken
- Re: [Groff] changed .substring,
Bernd Warken <=