1. How to display output by using tcl script?
Answer:
1. To display text by using tclscript we will use "puts".
Syntax:
1.puts "text to display"
2.puts {text to display}
examples:
puts "Welcome to yogitcl.blogspot.com"
o/p: Welcome to yogitcl.blogspot.com
puts {Welcome to yogianderoidev.blogspot.com}
o/p: Welcome to yogitcl.blogspot.com
2. How to display value of a variable ?
Syntax:
1.puts "$varaible"
example:
set a 10
puts "$a"
o/p: 10
3.How to display a variable ?
Syntax :
puts {$varaible}
puts \$variable
example:
puts {$x}
o/p: $x
puts \$integervalue
o/p: $integervalue
Answer:
1. To display text by using tclscript we will use "puts".
Syntax:
1.puts "text to display"
2.puts {text to display}
examples:
puts "Welcome to yogitcl.blogspot.com"
o/p: Welcome to yogitcl.blogspot.com
puts {Welcome to yogianderoidev.blogspot.com}
o/p: Welcome to yogitcl.blogspot.com
2. How to display value of a variable ?
Syntax:
1.puts "$varaible"
example:
set a 10
puts "$a"
o/p: 10
3.How to display a variable ?
Syntax :
puts {$varaible}
puts \$variable
example:
puts {$x}
o/p: $x
puts \$integervalue
o/p: $integervalue
No comments:
Post a Comment