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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If command question

Status
Not open for further replies.

firewine

Technical User
Sep 21, 2006
1
US
if u dont have any boolean expression in the command line after "if" how can i write a logic. Imean , for example

set a apple

if {$a = apple } {
puts 1
}

this command line gives an error that says : u have extra tokens at the end of expression.
any way to write it correctly?
or need any other command?

i hope i could explain ma question clearly
Thank you all..
 
Try:
set a apple

if {$a == "apple" } {
puts 1
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top