ActiveState Community

And Condition

Posted by phi on 2009-04-03 10:58

Hey,

I need a quick answer. Is there an AND statement in tcl/tk to use with the if statement.

Basically i have my code like this.

[code]
if {$varUser==$User } &{
puts "User $varUser exists with password $varPassword"
}
[/code]

There is no "&&" in tcl/tk. So what is its equivalent?

Thank,
Philip.

jeffh | Fri, 2009-04-03 11:23

Please reread the docs. There is indeed an && for use in expressions.

phi | Fri, 2009-04-03 12:39

yeah, just discovered it, was about to say i found it. I have the book Practical programming in tcl/tk. Its not worth a crap. I couldn't find any of this information in it. Sorry for the multitude of questions. I'm developing a software application in tcl/tk.
Thanks again Jeff