Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing comma delimited string
Message
From
24/11/2001 09:00:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/11/2001 16:09:56
Ron Neumann
Wausau Financial Systems
Mosinee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00585228
Message ID:
00585352
Views:
20
>I need to parse a comma delimited string in VFP 5.0. Since I can't use ALINES() in 5.0, what would be the best way to parse this string.
>
>"111111,222,333"
Ron,
Normally I take memlines() or array processing approach as already presented by folks. Here is a simple nasty trick to do it in another way (just for fun):
lcString = "hello,there,from,fox"
loDummy = createobject('combobox')
with loDummy
 .RowSourceType = 1 && Value delimited with commas
 .RowSource = lcString
 dimension arrElems[.ListCount]
 for ix=1 to .ListCount
   arrElems[ix] = .List(ix)
 endfor
endwith
loDummy = .null.
release loDummy
disp memo like arrElems
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform