Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
bgColor#eeeeee
borderWidth1

# Legal string syntax in Tcl
set x hello
set y "hello"
set z "hello world"

...

No Format
bgColor#eeeeee
borderWidth1

set x 4
puts "He ate $x apples" ; # prints 'He ate 4 apples'

...

No Format
bgColor#eeeeee
borderWidth1

set l { He ate 4 "green apples" }
set l [list He ate 4 "green apples" ]

...

No Format
bgColor#eeeeee
borderWidth1

set x 4
puts "He ate $x apples"   ; # prints 'He ate 4 apples'
puts { He ate $x apples } ; # prints 'He ate $x apples'

...

No Format
bgColor#eeeeee
borderWidth1

set x 4
qpushbutton "Immediate" "qinformation Information $x" ; # displays '4'
qpushbutton "Delayed" { qinformation Information $x } ; # displays '5'
set x 5

...

No Format
bgColor#eeeeee
borderWidth1

set result [expr 2 + 2 ]
puts $result

...

No Format
bgColor#eeeeee
borderWidth1

set l [list 1 2 3]

Here the variable 'l' is assigned and the value returned by the bracketed expression, which in this case creates a list.