Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP equivlants of VBScript
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00519401
Message ID:
00519424
Views:
14
Eric,
>split(string,constant) - This will split a text string into an array where the constant appears. like this example
>
>Dim MyString, MyArray, Msg
>MyString = "VBScriptXisXfun!"
>MyArray = Split(MyString, "X")
>' MyArray(0) contains "VBScript"
>' MyArray(1) contains "is"
>' MyArray(2) contains "fun!"
>

In VFP 7 (supposedly shipping this month), the ALINES() function has been augmented to have this capability. I don't know of a simple (without writing something yourself) in VFP 6.


>The other is...
>filter(stringarray, value) - This will create an array with elements from the string array containing value. For example
>
>Dim MyIndex
>Dim MyArray (3)
>MyArray(0) = "Sunday"
>MyArray(1) = "Monday"
>MyArray(2) = "Tuesday"
>MyIndex = Filter(MyArray, "Mon")
>' MyIndex(0) contains "Monday"
>

None that I know of.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform