CT_NUMLINE

 NUMLINE()
 Determines the number of lines required for string output
------------------------------------------------------------------------------
 Syntax

     NUMLINE(<cString>,[<nLineLength>]) --> nNumber

 Arguments

     <cString>  Designates the character string that is processed.

     <nLineLength>  Designates the length of an output line.  The default
     value is 80 characters.

 Returns

     NUMLINE() returns the number of lines required for text output.

 Description

     NUMLINE() can determine the number of lines that are required to output
     a MEMO field.  The return value relates to a line length that is
     determined by <nLineLength>.

 Note

     .  With the exception of the carriage return and the line feed,
        this function treats all characters as printable with a width of 1.
        If the <cString> text contains tabs, then you must first use the
        TABEXPAND() function to expand the tabs to spaces.

 Examples

     .  A null string occupies one line:

        ? NUMLINE("")                                       // 1

     .  A string one character longer also occupies one line:

        ? NUMLINE("-")                                      // 1

     .  80 characters, at a line width of 80 characters (default
        value), occupy two lines:

        ? NUMLINE(REPLICATE("-", 80))                       // 2

     .  100 characters, at a line width of 30 characters, occupy 4
        lines:

        ? NUMLINE(REPLICATE("-", 100), 30)                  // 4

     .  A line feed is also handled correctly -- an extra line is
        required:

        ? NUMLINE("-", +crlf)                               // 2
        ? NUMLINE(REPLICATE("-", 100) +crlf, 30)            // 5

See Also: TABEXPAND() MAXLINE()

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.