You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 31 Next »

 returns a section from a document starting and ending with lines containing specific strings

Syntax

Arguments

  •  is a string containing the source document.

  •  is a sub string of  which indicates the first line of the section.

  •  is a sub string of  that indicates the end of the section.
    The result starts with the first line of  containing PageHeader$ and ends with the line just before the line containing PageEnd$.

  •  is an optional value, containing the number of lines to be added at the end of the section. E.g. when, also the line containing  is included.

Remarks

  1. If PageHeader$="NullString", the function returns "NullString".
  2. If PageHeader$ is not found, the function also returns "NullString".
  3. If PageEnd$="NullString", the function returns all text from Document starting with PageHeader$.
  4. If PageEnd$ is not found, the function also returns all text from Document starting with PageHeader$.
  5. The last line of the result returned by SECTION$() is always terminated by a CrLf (Carriage Return + LineFeed: Chr$(13)+Chr$(10) ). Multiple repeating CrLf's at the end of an extracted section are removed as well as trailing strings from each line in that result.
  6. One can also use the PARAGRAPH$ function to return a section of a document.

Examples

Assuming a document with the following text:

then 

returns


returns

Because "Ceremony" does not occur in Document$. Note, the function is case sensitive.


returns

"NullString"

since "falls apart" is not present in Document$.


returns

Two more lines are included.


 

Quick links: Functions overview | Attribute overview | Constants overview | Dimensions overview

  • No labels