TCL - Curly Braces ({) and (})

Card Puncher Data Processing

TCL - Curly Braces ({) and (})

About

Tcl uses curly braces ({) and (}) as preferred method for escaping special characters and writing valid, complex arguments. For the following situations, you can enclose the element in braces and leave the contents alone:

  • The element contains embedded spaces.
  • The element contains one of the Special Characters.
  • The element starts with a brace or double-quote.
  • There are no characters in the element.

You should consider using the backslash for escaping only in the limited situations that using curly braces results in unmatched braces, the last character of the argument is a backslash, or the element contains a backslash followed by another backslash indicating a new line.

Documentation / Reference





Discover More
Card Puncher Data Processing
TCL - Backslash (backward slash)

Tcl uses the backward slash: to indicate the end of a line in a command that spans multiple lines. as the least preferred method for escaping special characters. Use curly braces as the preferred...
Card Puncher Data Processing
TCL - Regexp - Regular Expression

The regular expression in TCL: - Match a regular expression against a string - Perform substitutions based on regular expression pattern matching The regexp command has as syntax: ...
Card Puncher Data Processing
TCL - Special Characters

Special characters: dollar sign ($), backslash (\), bracket ([ ), number sign (#), semicolon (;), and exclamation point (!) Note that Tcl uses curly braces ({) and (}) as preferred method...
Card Puncher Data Processing
TCL - list (array or vector)

From a usage point of view, a list is a finite ordered collection of element as (a,b,…,z). Every list has a length, which is an integer >=0 Every element of the list is identified by its index into...



Share this page:
Follow us:
Task Runner