I've used several other program languages but have NEVER seen the behavior shown by the POSITION> command while searching for substrings when the search is initiated from other than the first character.
EXAMPLE:
let>string=ABCDxxxEFG
Pos>xxx,string,4,ptr
Most other programs would return 5 as the resultant pointer (ptr).
Macro Scheduler returns a 2
Every other programming language I've used returns the pointer in absolute terms related to the original string. Macro Scheduler apparently returns the pointer relative to a substring beginning at the start-search index.
This is crazy behavior, if not an outright bug.
At the very least, the documentation should reflect the operation.
Strange POSITION> Function Behavior
Moderators: JRL, Dorian (MJT support)
This message appears to be a duplicate one. I'm sure I just replied to an identical message in Enhancement Suggestions. I refer you to there for my response. Please don't cross post as it is confusing.
MJT Net Support
[email protected]
[email protected]