Pascal Viandier wrote:
When trying to write a sample program to illustrate the problem, I become more confused than before. It seems to be more complicated than I thought.
First, I was somewhat wrong from the start. In fact, it looks like Length() may be the source of the problem.
I don't know how to handle this.
Me neither. If I had a program to work with, I might be able to find out something. I don't do second-guessing anymore.
Wrong parentheses. What you probably mean is this:
If (P > 0) And (P < Length(LocalS))
It was a typo in the email, not in the code (I re-typed it manually).
Yes another reason for posting complete, tested, sample code, instead of made-up fragements ...
Frank