Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What exaclty is this code doing?
Message
 
 
To
20/03/2013 12:47:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01568853
Message ID:
01568855
Views:
80
>
IF ALLTRIM(m.DZp) <> "MX" AND m.DZp <> "00000"
>		fd=AT(",", m.DCiSt)
>		IF fd = 0
>			mEr = mEr + nb + "Cannot Determine Destination State"
>		ELSE
>			mCity = ALLTRIM(LEFT(m.DCiSt,fd-1))
>			mState = ALLTRIM(SUBSTR(m.DCiSt,fd+1))
>			IF NOT mState $ StStr OR LEN(mCity) < 3 OR m.DCiSt = "Unknown"
>				mEr = mEr + nb + "Cannot Determine City, State of Destination"
>			ENDIF 
>		ENDIF 		
>	ENDIF
>
>To me it looks like it's looking for a Mexico address that includes the city and zip code all in one line and parsing/splitting it out if it finds it. I'm having issue figuring how exactly the mEr is called upon, can someone help?

What exactly is the problem? BTW, perhaps check for m.DCiSt = 'Unknown' should be at the top also, you do not need to attempt to parse. Also, that case can not be true (assuming you're not looking for the first part of the word = 'Unknown' but comma still in that field).
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform