Posted to tcl by MaxJarek at Sat Mar 09 13:31:08 GMT 2013view raw
#
# Test
#
Comments
Posted by jj at Sat Mar 09 13:35:27 GMT 2013 [text][code]
;# Show how a \ affects the $
set Z "Albany"
set Z_LABEL "The Capitol of New York is: "
puts "$Z_LABEL $Z"
puts "$Z_LABEL \$Z"
;# The next line needs a backslash to escape the '$'
puts "\nBen Franklin is on the $100.00 bill"
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
puts "\n................. examples of escape strings"
puts "Tab\tTab\tTab"
puts "This string prints out \non two lines"
puts "This string comes out\
on a single line"
;# Show how a \ affects the $
set Z "Albany"
set Z_LABEL "The Capitol of New York is: "
puts "$Z_LABEL$Z"
puts "$Z_LABEL \$Z"
;# The next line needs a backslash to escape the '$'
puts "\nBen Franklin is on the $100.00 bill"
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
puts "\n................. examples of escape strings"
Comments
Posted by jj at Sat Mar 09 13:35:27 GMT 2013 [text] [code]
;# Show how a \ affects the $ set Z "Albany" set Z_LABEL "The Capitol of New York is: " puts "$Z_LABEL $Z" puts "$Z_LABEL \$Z" ;# The next line needs a backslash to escape the '$' puts "\nBen Franklin is on the $100.00 bill" 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 puts "\n................. examples of escape strings" puts "Tab\tTab\tTab" puts "This string prints out \non two lines" puts "This string comes out\ on a single line"