Basic Language Features

; or newline

Statement separator

Statement continuation if last character in line

#

Comment (null command)

var

Simple variable

var(index)

Associative array variable

var(i,j,...)

Multidimensional array variable

$var

Variable substitution (also ${var})

[command]

Command substitution

char

Backslash substitution (see "Backslash Substitutions,” later in this chapter)

"string"

Quoting with variable substitution

{string}

Quoting with no substitution (deferred substitution)

The only data type in Tcl is a string. However, some commands interpret arguments as numbers or boolean values. Here are some examples:

Integer

123 0xff 0377

Floating point

2.1 3. 6e4 7.91e+16

Boolean

true false 0 1 yes no

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset