Page 1 of 1

SCAN Function for Special Characters

Posted: Fri Nov 26, 2010 9:39 am
by mce
Hi,

When I use SCAN function to find character : in a text, it does not work.

Code: Select all

vFuncID = SUBST(vElement,1,SCAN(vElement,':')-1);
Is there anything wring with this? or is there a special way of using SCAN for special characters?

Any help would be apprecicated.

Regards

Re: SCAN Function for Special Characters

Posted: Fri Nov 26, 2010 10:04 am
by Steve Rowe
If you are sure the : exists in vElement then perhaps try putting the ~ infront of the :

HTH

Re: SCAN Function for Special Characters

Posted: Fri Nov 26, 2010 10:14 am
by mce
I found my mistake. Here is the correct one.

Code: Select all

vFuncID = SUBST(vElement,1,SCAN(':',vElement)-1);