Tuesday, 18 August 2015

Tool Command language (Tcl) .. First lecture ( variable declaration )

Variable Declaration 

  In c prog language  when we  declare some variable , we write 
  int x = 3;

  But in Tcl we write
  set x 3;
         "here it is stored as string"
  No need to declare just assign a value to variable. This  statement     will create a variable name x and store it as string.
          Now if we write
puts [expr $x + 5] #  we can also use (put)
      here x is automatically converted into int.
 Now to print x we will write


puts $x .. Answer will be 8 ( as expr above does addition operation)







No comments:

Post a Comment

Grammar Mistakes in Technical Paper Writing

Let me share some experience in this post with you. I'm currently in the second year of my Ph.D. program. We are in the middle of paper...