Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting text from a specific line
Message
De
07/02/2016 06:22:10
 
 
À
06/02/2016 13:40:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01630920
Message ID:
01631033
Vues:
84
Hi Tore
can test each line obtained if there is an unwanted sign at the begining:

ex: for line i
local m.xline,m.x,m.signs
m.xline=mline(m.mytext,i)
m.x=susbstr( m.xline,1,1) &&first char (can make a loop if more than 1 sign)
m.signs=[',',';'':','?','/','\'] &&can complete
if inlist(m.x,m.signs)
m.xline=substr(m.xline,2)
endi
.....

or use in this code mline with its offset definition
MLINE(MemoFieldName, nLineNumber [, nNumberOfCharacters])
nNumberOfCharacters Specifies the number of characters from the beginning of the memo field after which
MLINE( ) returns the specified line.
m.xline=mline(m.mytext,i,1) &&returns line after first char....

can also use _MLINE = nNumberOfCharacters
Contains the memo field offset for the MLINE( ) function.
Foxhelp says its more performent. i tried it in win10 and there is no diffrence between normal mlines and adding _mline.

Note that for a long text (mline,memlines).....are very very slow.i tried in past to extract all lines from a long text , this can make easily mor than 30 minutes !

Regards
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform