TPUHELP.HLB  —  FILL
  FILL

     FILL reformats text in the specified buffer or range so the lines of
     text are approximately the same length.  To do this, FILL distinguishes
     between word characters, which it does not separate, and word
     separators, which it uses as points where lines may be separated.

  Syntax

     FILL ({buffer | range} [,string [,integer1 [,integer2
           [integer3  ] ] ] ])

  Parameters

     buffer               The buffer whose text you want to fill.

     range                The range whose text you want to fill.

     string               A quoted list of word separators you want to use.
                          A word separator is a character that FILL
                          recognizes as separating two words.  You do not
                          need to include the space character in the list of
                          word separators because the FILL built-in always
                          treats the space character as a word separator.

     integer1             The value for the left margin.  The value must be
                          at least 1 and must be less than the right margin
                          value.  The default is the value used by the
                          buffer.

     integer2             The value for the right margin.  The value must be
                          greater than the left margin and cannot exceed the
                          maximum record size for the buffer.  The default
                          is the value used by the buffer.

     integer3             The amount by which the first line should be
                          indented.  This value modifies the left margin of
                          the first filled line.  Use a negative value to
                          unindent or create a hanging paragraph.  Use a
                          positive value to create a normally indented line.
                          You cannot use a value that will make the left
                          margin less than one.  For example, you cannot
                          specify a left margin of 5 and an indent value of
                          -5.  The value of the indent cannot cause the left
                          margin of the first line to be equal to or greater
                          than the right margin.

                          The default value is 0.

  Comments

     If you fill a range that does not begin at the beginning of an existing
     line, FILL does not change the left margin of that line.  If you fill a
     range that starts or ends in the middle of a word, FILL may insert a
     line break in that word.

     When FILL moves text up to the previous line, the built-in appends a
     space to the end of the previous line if that line ends in a space or a
     word character.  It does not append a space if the previous line ends
     in a word separator other than a space, such as a hyphen.  FILL moves
     any word separators at the beginning of a line up to the previous line.

     When moving text to a previous line, FILL also moves up any word
     separators which follow the word, even if the separators extend beyond
     the right margin.  FILL does not move up a separator if it will make
     the line exceed the buffer's maximum record size.  If moving up a word
     and its separators makes a line end in one or more spaces, FILL deletes
     one trailing space.

     FILL splits lines that are too long.  FILL splits the line at the first
     character of the first word that extends past the right margin, unless
     there is only one word on the line.  If this is the case, FILL leaves
     the word on the line.

  Example

     The following statement fills the paragraph assigned to the range
     variable "paragraph_range".  The FILL operation will recognize both
     spaces and hyphens as word separators.  FILL will use a left margin of
     5, a right margin of 65, and a first line indent of 5.  The screen
     space will be measured in character cells.

     FILL (paragraph_range, "-", 5, 65, 5, CHARACTERS)
Close Help