Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WordNum() in FoxTools 6.00 still returns 255 chars
Message
De
14/10/1999 17:34:15
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00276381
Message ID:
00276584
Vues:
29
>>Actually, I don't know if I should be worried at all - it seems to strip only the last character from memo fields created from a text file (tab delimited) exported from something that seems like Access (uses .mdbs for sure), and it doesn't seem to go beyond 256, so I'm losing just the last byte sometimes. Still, I wouldn't like to have to worry about this in case I needed longer chunks.
>
>Might be enough to add the cumulative string lengths plus delimiters together as a check. It'd probably be better to locate any string of 255 characters within the source (using AT() I suppose), then check the next character to see if it's a delimiter or not.

Far easier than that - I've just turned the logic around. Since the string I'm chopping is one line from a tab delimited file, instead of
for i=1 to words(string, tab)
chop=wordnum(string, i, tab)
grind(chop)
endfor

I've done this:

string=chrtran(string, tab, cr)
n=alines(array, string)
for i=1 to n
grind(array[i])
endfor

Furthermore, it seems to be about four times faster this way. Not sure if this is the only thing that influenced the speed, but sure can't complain about the outcome, right?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform