Range Definition

The Range Definition dialog box appears when you add a new range element, or edit a range element in the Language Properties: Comments and Ranges dialog box. It controls all the properties of a range. A range definition specifies how comments and other multi-line range elements are parsed. A quoted string is an example of a non-comment multi-line range element.

Type of range

Select the type of range element from this list. There are two types of range elements:

Line The range starts with a delimiter, and extends to the end of the line. It cannot span more than a single line.

Multiline The range starts with a delimiter, and ends with another delimiter. The range can span more than single line, but it can also be contained within a single line. The starting and ending delimiter can be the same (such as a quote).

The list also contains presets for single and double quoted string ranges, and some comment styles. When you select one of the presets, the parameters for the preset are loaded into the other text boxes in the dialog box.

Syntax Formatting Style

This specifies the syntax formatting style to apply to the range. Normally, you would select a comment style. However, you are free to select any style. If the range element describes a quoted string, you would probably want to select the “String” style. See also “Style Properties”.

Note: The style is applied to the whole range. The style overrides any other automatically applied style, such as “Reference To…” styles.

Range begins/ends with

These two text boxes specify the delimiter tokens that start and end the range. The tokens can be up to 15 characters long. If a Line range type is specified, then there is only one delimiter text box enabled. If you are specifying a Multiline range, the beginning and ending delimiters can be the same. This would be the case for a quoted string.

Escape sequence

If either the Begin or End delimiter is preceded by this escape sequence, then the delimiter is ignored. For example, you might specify backslash \ as an escape character in a quoted string so that you can embed quote characters inside the string like this: “a string with \”embedded\” quotes”.

Allow nesting

This applies only if a Multiline range is specified. If this option is turned on, then the range can be nested. If the Begin and End delimiters are the same, nesting is not allowed because it doesn’t make any sense.

Skip symbol parsing

The contents of the range will be ignored when the file is parsed for symbol definitions.

Include delimiters in style

The Begin and End delimiters are also formatted with the selected style. If this is unchecked, then the delimiters are formatted in the “Delimiter” style.

Columns Group

The columns group allows you to control if the range element should be sensitive to where on the line it occurs.

Only valid in the following columns

If enabled, then the range is only recognized if its Begin delimiter occurs in the range starting at the First column and up to and including the Last column. If this check box is unchecked, then the column is ignored.