Page 1 of 1

Scan Fun and Games

Posted: Fri Mar 06, 2015 9:52 pm
by jim wood
Guys,

I've always had fun with Scan but I'm having trouble with it today. For some reason it keeps returning 0.

Here is the code for the variable being examined by the scan:

Code: Select all

V2=DimNm('}Groups',1);
Here is the result:
Issue Part 1.PNG
Issue Part 1.PNG (1.6 KiB) Viewed 2504 times
Here is the code for the scan:

Code: Select all

V3=SCAN(V2,'-GRP');
Here is the result of the scan:
Issue Part 2.PNG
Issue Part 2.PNG (1.53 KiB) Viewed 2504 times
I'm doing this in version: 10.1.1

It's late in the day and it may be something obvious so don't go kicking my door down if it is :)

Jim.

Re: Scan Fun and Games

Posted: Fri Mar 06, 2015 10:09 pm
by Duncan P
SCAN finds the first string in the second, not the second string in the first.

HTH

Re: Scan Fun and Games

Posted: Fri Mar 06, 2015 10:37 pm
by jim wood
Thanks Duncan. I knew it would be something stupid like that. With the bad we've had this week, it's been a very long one indeed.