Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a bug 1

Status
Not open for further replies.

stewang

Programmer
Aug 21, 2003
77
NZ
Code:
Hello:
please find out the problem for me that why my code can not work.
 
 set i 10
 if { $i == 10 }
    puts $i

thanks
 
Code:
  set i 10
  if { $i == 10 } { puts $i }
or
Code:
  set i 10
  if { $i == 10 }   { puts $i }
or
Code:
  set i 10
  if { $i == 10 } { 
    puts $i 
  }
The if command takes two or more arguments. The first beeing the test.
A litteral between braces can contain newlines.
A \ at the end of the line joins the current line and the following line.

For more you need to read the endekalogue (the eleven rules): And the if page of the Tcl manual:
HTH

ulis
 
Hi ulis:
Thanks for your response.
These solution are quit helpfull.

Thanks for your time.

rgds
stewang
 
Hi ulis:
Do you known some helpfull websites of tk like
" ? Can you give me some, please?

I found that the " is very usefull. For example, if I want to known how to use the switch statement in tcl, I just need to type switch in the tcl website, like " then it will bring out the solution to me.

rgds
stewang
 
stewang, you discovered the Tclers Wiki!

The entry point is:
Each day there is something new.
Try "Recent changes" to see what.

ulis
 
Yes, I played around with your website, I found it is convinet
for people find things.

Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top