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!

why i canno check my variable is empty or not?

Status
Not open for further replies.

jloh81

Programmer
Jun 15, 2010
16
US
hi,

i want to check whether the x is a empty list, if not empty list i want perform some function, below is the code.

The function that i want to perform is: I have 2 list, and i want to check whether this 2 list have the same element or not? if not the same, get the extra element.

foreach i $io {
if { $x == ""} {
continue
} elseif { $x != ""} {
if {[lsearch -exact $x $i] == -1} {
lappend y $i
}else {
set x $io
}

please advice.
Thanks
 
hi,

I found a command :

compare-list lista # listb list c

why i cannot use it like that? What is the correct way to use this command?

Please advice asap!
THanks
 
I never heard of list compare command

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top