Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MLine
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: MLine
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01493798
Message ID:
01493801
Views:
71
Function MLINE() is very slow.

Function ALINES() is faster.
LOCAL lii
LOCAL ARRAY laLines(1)
FOR lii=1 TO ALINES(laLines,lcInnerText)
    lConteudo = laLines(lii)
NEXT
or ...
LOCAL lcEndLine
lcEndLine=CHR(13)+CHR(10)
IF AT(lcEndLine,lcInnerText)=0
   lcEndLine=CHR(13)
   IF AT(CHR(13)+CHR(10),lcInnerText)=0
      lcEndLine=CHR(10)
   ENDIF
ENDIF

lcInnerText=STRTRAN(lcInnerText,lcEndLine, ";"+lcEndLine+"Print ")

IF NOT RIGHT(lcInnerText,LEN(lcEndLine))==lcEndLine
   lcInnerText=lcInnerText+";"
ENDIF

IF NOT LEFT(lcInnerText,LEN(lcEndLine))==lcEndLine
   lcInnerText="Print "+lcInnerText
ENDIF
MartinaJ

>I would like to replace all lines in my file with "Print" + line + ";"
>
>I have the structure below to scan the lines over the file
>Can I anybody help me to replace the lines in the file or create another file with the lines replaced ?
>
>Moises
>
>
>
>
>
> nLinhas =(MEMLINES(lcInnerText))
> 
> FOR 1 TO nLinhas         && scanning lines
>
>lConteudo = (MLINE(lcInnerText, mLinha))
>
>
>NEXT
>
>
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Reply
Map
View

Click here to load this message in the networking platform