Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>mlpos()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
MLPOS()


Syntax:     MLPOS(<expC>, <expN1>, <expN2> [,<expN3>] [,<expL>])

Purpose:    To determine the position of a specified line number in a
            character string or memo field.

Arguments:  <expC> is the character string or memo field.

            <expN1> is the number of characters per line.

            <expN2> is the line number.

            <expN3> is the tab size.  The default is four.  If
            <expN3> is greater than or equal to <expN1>, then the tab
            size is <expN1> - 1.

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

Returns:    An integer numeric value.

            MLPOS() returns the position in <expC> of the specified line
            number.  If <expN2> is greater than the number of lines in
            <expC>, MLPOS() returns LEN(<expC>).

Library:    EXTEND.LIB


----------------------------------- Example --------------------------------

   This example loads a text file from disk and then finds the position
   of the fifth line of text given a line length of 40 characters:

   line_len = 40
   line = 5
   string = MEMOREAD("Temp.txt")
   loc = MLPOS(string, line_len, line)


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

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