IIF with AT to find parse marker  
Author Message
Horisly





PostPosted: Wed Jul 23 12:57:37 CDT 2003 Top

Exchange Servers >> IIF with AT to find parse marker

Hi,
I'm trying to parse a string using a combination of IIF and AT.

This produces a "Function argument value, type, or count is invalid."

pat_name is a field

c = iif(at('^', pat_name), at('^', pat_name), len(pat_name))


Any ideas?
--
Thank you,
Louis Sorbera

Exchange Server45  
 
 
Eric





PostPosted: Wed Jul 23 12:57:37 CDT 2003 Top

Exchange Servers >> IIF with AT to find parse marker Hello, Louis!
You wrote on Wed, 23 Jul 2003 13:50:33 -0400:

LS> c = iif(at('^', pat_name), at('^', pat_name), len(pat_name))

Your IIF() statement is incorrect. You need to enter a logical expression in
the first parameter. Try:
c = iif(at('^', pat_name) > 0, at('^', pat_name), len(pat_name))
Note: it is bad practise to use variable names like a, b, c up to j and m.
These are reserved words in VFP.
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8


 
 
Frank





PostPosted: Thu Jul 24 02:31:01 CDT 2003 Top

Exchange Servers >> IIF with AT to find parse marker Hello Louis,


> I'm trying to parse a string using a combination of IIF and AT.

Why don't you use an combination of GETWORDCOUNT() and GETWORDNUM()?

Frank
--