|
![](/i/fill.gif) |
Rune <run### [at] iname com> wrote:
> In the POV-Ray documentation on the page about string functions the
> following is stated:
>> substr(S,P,L) Sub-string from S. Returns a string that is
>> a subset of the characters in parameter S starting at the
>> position specified by the integer value P for a length
>> specified by the integer value L. For example
>> substr("ABCDEFGHI",4,2) evaluates to the string "EF".
>> If P+L>strlen(S) an error occurs.
> However, there are two errors. The last but one line should read:
>> substr("ABCDEFGHI",4,2) evaluates to the string "DE".
> And the last line should read:
>> If P+L+1>strlen(S) an error occurs.
> Or something like that.
> Can anybody confirm?
> And is this a known bug?
This is C style, counting from 0 rather than 1, which is what arrays do.
Have you tried the program to see what it does? Does it count from 1 or 0?
If it goes from 1, then I see it as a bug in the program, not the docs,
because it's inconsistent.
Speaking of manual bugs, can anyone confirm that the #range feature for
#switch is actually lower < value <= upper and not lower <= value <= upper
like it says in the manual?
Geoff
Post a reply to this message
|
![](/i/fill.gif) |