Hello TCL
TCL is an interpreter based language. It is mainly used in VLSI design. tclsh is an interpreter for this language. We can directly run a command using tclsh in interactive mode or we can write our command in a file with extension .tcl and run this file using tclsh interpreter.
Here we are going to write a file named hello.tcl and then we will run it as, tclsh hello.tcl
# This is a comment. It is being used to help the readers of this code.
# It is not executed by tclsh interpreter i.e. interpreter ignores it.
# It is effective until the end of the current line.
# It can be written after a command ending with a semicolon.
# puts is being used to write a string on the console.
# We can use double quotes or curly braces to write a string using several words.
# We can write a command without ending with a semicolon but we can't write a comment after it.
puts HelloTCL!
puts "Hello TCL!"; # A string with multiple words.
puts {Hello TCL!}; puts "Happy to meet you."; # These two outputs will be on the
# separate lines because puts inserts a newline after printing the string.
Happy reading and thank you. Meet you soon.
Comments
Post a Comment