Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching for characters
Message
From
24/01/2003 10:30:15
 
 
To
24/01/2003 08:15:33
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00744971
Message ID:
00745064
Views:
24
Henry, I see that Hilmar has already provided a solution. This might also help. The following will return .T. if cString1 does not contain any of the chars in cString2:

cString1 = "Your source string"
cString2 = "Chars to test for"

? EMPTY( CHRTRAN( cString1, CHRTRAN( cString1, cString2, "" ), "" ) )

(Solution extracted from several similar UT threads)

>Goodmorning Jos:
>
>Thak you for your kind reponse. With the IF statement, I want to check if variable mCharacters contains any of the alphabetic letters. If it does then, I want to remove the first two characters, which are the position that could potentially have alphabectic characters, so that all that is left are numbers. This field has been declared as a Character field.
>
>Thank you Jos.
>
>>Henry, none of the lines are wrong in any obvious way - provided mCharacters and mOldID exist and IncompleteList is an object with ID as a property. What are you trying to do with this code snippet?
>>
>>
>>>Hi all:
>>>
>>>The following code does not want to work.
>>>
>>>
IF mCharacters = ("ABCDEFGHIJKLMNOPQRSTXYZ")
>>>			mID = alltrim(SUBSTR(mOldID,3,7))
>>>		ELSE
>>>			mOldID = IncompleteList.ID
>>>		ENDIF
>>>
>>>Where am I going wrong? TIA.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform