Beruflich Dokumente
Kultur Dokumente
set Y 1.24
puts $X
puts $Y
puts "..............................."
output
This is a string
1.24
...............................
The value in Y is: 1.24
set Z Albany
set a 100.00
puts "Washington is not on the $a bill" ;# This is not what you want
puts "Lincoln is not on the $$a bill" ;# This is OK
puts "Hamilton is not on the \$a bill" ;# This is not what you want
puts "Ben Franklin is on the \$$a bill" ;# But, this is OK
output
on two lines
This string comes out on a single line
grouping words with double quotes allows substitutions to occur within the double
quotes. By contrast, grouping words within double braces disables substitution
within the braces. Characters within braces are passed to a command exactly as
written. The only "Backslash Sequence" that is processed within braces is the
backslash at the end of a line. This is still a line continuation character.
set Z Albany
set a 100.00
puts "Washington is not on the $a bill" ;# This is not what you want
puts "Hamilton is not on the \$a bill" ;# This is not what you want
puts "Tab\tTab\tTab"
on a single line"
output