Strange POSITION> Function Behavior

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Waldo
Junior Coder
Posts: 20
Joined: Fri Oct 29, 2004 4:22 am

Strange POSITION> Function Behavior

Post by Waldo » Fri Oct 29, 2004 4:34 am

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.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Oct 29, 2004 8:04 am

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]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts