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

Syntax:     NUMLINE(<expC>[,<expN>])

Arguments:  <expC> is the string to be processed.
            <expN> denotes the length of an output line (default: 80
            characters).

Returns:    A numeric value.
            The number of lines required for the text output will be
            supplied.

Usage:      NUMLINE() can be used, for instance, to establish the
            number of lines for the output necessary for a memo field.
            The function will then relate to a length of line that can be
            selected via <expN>.

Notes:      The function will treat all characters except the carriage
            return or the line feed characters as printable characters of
            width 1.  Use TABEXPAND() function to expand any tabs.

Library:    CT1.LIB


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

Examples:   * A null string occupies 1 line.
            ? NUMLINE("")                               && 1

            * A string 1 character longer also occupies
            * 1 line.
            ? NUMLINE(".")                              && 1

            * 80 characters at a line width of 80 (default)
            * occupy 2 lines.
            ? NUMLINE(REPLICATE('-",80))                && 2

            * 100 characters at a line width of 30 occupy
            * 4 lines.
            ? NUMLINE(REPLICATE('-",100),30)            && 4

            * a line feed is also handled correctly.
            * An additional line will be required.

            crlf = CHR(13)+CHR(10)
            ? NUMLINE("-"+crlf)                         && 2
            ? NUMLINE(REPLICATE("-",100)+crlf,30)       && 5



See Also: MAXLINE() TABEXPAND()

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