User Tools

Site Tools


split_merge_a_single_line_string_to_multiple_lines_.htm
Navigation:  Templates > Template Language Reference > Built-in Template Procedures >====== SPLIT (separate single line string to multiple lines) C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

SPLIT ( string [, splitcolumn ] [, indent ] )

blk2blue.jpg

SPLIT Split a single comma delimited list of attributes to multiple lines
string A string constant, template symbol or expression containing a comma delimited list of attributes.
splitcolumn An integer constant, template symbol or expression that identifies what column to split the line at.
indent An integer constant, template symbol or expression that designates the amount of spaces to indent on all lines generated after the first line.

SPLIT is used to divide a long string of comma delimited attributes into multiple lines. As each new line is created, they are connected using the line continuation ( | ) character, which is automatically generated. Lines are split near to the value of the splitcolumn column value (before or after) based on the Clarion syntax at that position. Subsequent lines are indented using the indent value to determine the number of leading spaces.

If the splitcolumn parameter is omitted, a default value of 90 is used.

If the indent parameter is omitted, a default value of 2 is used.

We need to clarify the term “comma delimited list of attributes” as used in SPLIT, UNSPLIT, EXTRACT, REPLACE and SEPARATOR functions. These functions assume that the string parameter has the following form:

[<;label>]  <;attribute>,<;attribute>,<;attribute>, …

In addition, each <;attribute> has the following format:

<;name>[([<;parameter>],[<;parameter>],…)]

<;name> is an identifier, or an identifier with a leading # character or a string constant. <;parameter> is any valid expression.

The list of attributes may also have a leading <;label>, which is an identifier, and separated from the first attribute by one or more whitespaces.

See Also: UNSPLIT, EXTRACT, REPLACE, SEPARATOR

Built-In Template Procedures

split_merge_a_single_line_string_to_multiple_lines_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1