TCL - Backslash (backward slash)

Card Puncher Data Processing

About

Tcl uses the backward slash:

  • to indicate the end of a line in a command that spans multiple lines.

Don't add anything after, even a space otherwise you can get this kind of error.

OMB00001: Encountered <EOF> at line: 1, column: 130. Was expecting one of: "OF"
...
    "TO" ...
    .

Use curly braces as the preferred method.

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.

Replacement during the substitution phase

There are specific “Backslash Sequence” strings which are replaced by specific values during the substitution phase. The following backslash strings will be substituted as shown below.

String Output Hex Value
\ Any character immediately following the backslash will stand without substitution.
\a Audible Bell 0x07
\b Backspace 0x08
\f Form Feed (clear screen) 0x0c
\n New Line 0x0a
\r Carriage Return 0x0d
\t Tab 0x09
\v Vertical Tab 0x0b
\0dd Octal Value d is a digit from 0-7
\uHHHH H is a hex digit 0-9,A-F,a-f. This represents a 16-byte Unicode character.
\xHH…. Hex Value H is a hex digit 0-9,A-F,a-f. Note that the \x substitution “keeps going” as long as it has hex digits, and only uses the last two, meaning that \xaa and \xaaaa are equal, and that \xaaAnd anyway will “eat” the A of “And”. Using the \u notation is probably a better idea.





Discover More
Card Puncher Data Processing
TCL - Curly Braces ({) and (})

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...
Card Puncher Data Processing
TCL - How to write a directory path on Windows and Unix ?

How to write a directory path on Windows and Unix ? On the Windows Plateform, you must write a path by : enclosing it with a double quote using the forward slash (/) instead of the backslash...
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
Tool Command Language (TCL)

Tcl (from “Tool Command Language”) is a scripting language created by John Ousterhout. intended to be embedded into applications ( Oracle Warehouse Builder use it as scripting language : Mixed with...



Share this page:
Follow us:
Task Runner