[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
MEMOLINE()

    MEMOLINE() extracts a formatted line of text from a character
    expression or memo field.

Syntax

    MEMOLINE(<expC>,[<expN1>][,<expN2>][,<expN3>][,<expL>])

Arguments

    <expC> is the memo field or character string expression to extract
    from.

    <expN1> is the number of characters per line.  The default is 79, the
    maximum is 254, and the minimum is four.

    <expN2> is the line number to extract.  The default is one.

    <expN3> is the tab size.  The default is four.  If <expN3> is greater
    than or equal to <expN1>, then the tab size if <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.).

    Note that most arguments are optional.  To skip an argument and specify
    further arguments, pass a dummy argument for the argument you wish to
    skip.

Returns

    A character string.

    MEMOLINE() returns the line specified by <expN2> in <expC> based on the
    number of characters per line (<expN1>), the tab size (<expN3>), and
    wrapping behavior (<expL>).

    If <expL> is true (.T.) and an end-of-line position breaks a word, it
    is word-wrapped to the next line.  The next line then begins with the
    next non-blank character.  If <expL> is false (.F.), MEMOLINE() returns
    the number of characters specified by the line width (<expN1>).  The
    next line begins with the character following the next hard carriage
    return.  This means that the intervening characters are truncated.

    If the line has fewer characters than the indicated width, it is padded
    with blanks.  If the line number is greater than the total number of
    lines in the expression, MEMOLINE returns a null string ("").

Usage

    MEMOLINE() is designed to be used in combination with MLCOUNT() to
    extract lines of text from character strings and memo fields based on
    the number of characters per line.  The basic method of operation is to
    determine the number of lines in the memo field or character string
    using MLCOUNT(), the number of characters per line, the tab size, and
    the wrapping behavior.  Then navigate through the memo or character
    string with FOR...NEXT using the result of MLCOUNT() as the upper
    boundary of the loop.  Within the loop extract the current line with
    MEMOLINE() using the same values for the characters per line, tab size,
    and word wrap arguments.


See Also: HARDCR MLCOUNT MLPOS MEMOEDIT MEMOTRAN MEMOEDIT MEMOREAD MEMOWRIT
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson