Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>mlpos()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 MLPOS()
 Determine the position of a line in a character string or memo field
------------------------------------------------------------------------------
 Syntax

     MLPOS(<cString>, <nLineLength>,
        <nLine>, [<nTabSize>], [<lWrap>]) --> nPosition

 Arguments

     <cString> is a character string or memo field.

     <nLineLength> specifies the number of characters per line.

     <nLine> specifies the line number.

     <nTabSize> defines the tab size.  The default is four.  If
     <nTabSize> is greater than or equal to <nLineLength>, then the tab size
     is adjusted to <nLineLength> - 1.

     <lWrap> toggles word wrap on and off.  Specifying true (.T.) toggles
     word wrap on, and false (.F.) toggles it off.  The default is true
     (.T.).

 Returns

     MLPOS() returns the character position of <nLine> in <cString> as an
     integer numeric value.  If <nLine> is greater than the number of lines
     in <cString>, MLPOS() returns the length of <cString>.

 Examples

     .  This example uses MLPOS() to find the position of a specific
        line, given a line length:

        cString = MEMOREAD("Temp.txt")
        nLineLength = 40
        nLine = 5
        nPosition = MLPOS(cString, nLineLength, nLine)
        ? SUBSTR(cString, nPosition, 12)

 Files:  Library is EXTEND.LIB.

See Also: MEMOLINE() MEMOTRAN() MLCOUNT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson