Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing a text string
Message
De
15/02/2003 11:37:36
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00753613
Message ID:
00753713
Vues:
30
Right :) There are many other ways more but I only included this one as it was the fastest in my tests (for relatively short list of items).
Cetin

>Hi Cetin,
>
>Regarding your "older" method, I might suggest an alternative:
>
>
>tcStr = "2222 3333 4444 5555"
>tcStr = STRTRAN(tcStr, ' ', chr(13))
>
>for i=1 to memlines(tcStr) && now tcStr may be treated like a 1 column array
> ...
>endfor
>
>
>
>Hugh
>
>
>>*Older - for short lists this was fastest as I could see
>>tcStr = "2222 3333 4444 5555"
>>tcStr = chrtran(tcStr, " ",",")
>>oDummy = createobject('Listbox')
>>with oDummy
>> .RowSourceType = 1 && Value
>> .RowSource = tcStr
>> dimension arrVals[.ListCount]
>> for ix=1 to .ListCount
>> arrVals[ix] = .List(ix)
>> endfor
>>endwith
>>release oDummy
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform