hi,
I try to call 2 proc togather but the second proc seems cannot work like what it work without the first proc.
Below is the code:
proc comparevalue {} {
.....
}
proc writetocsv {} {
.....
}
comparevalue
writetocsv
Please advice.
Thanks
thanks for the suggestion.
But it still wont compare the 2 lists. I follow want you suggest to me. It return me, the code will append 2 list in one list for me. IT WONT COMPARE! i dont know where is going wrong? is it going wrong with when i set the list?
please see the attachment file
there is 2 line one is with io and one is x
how do i compare those 2 list?
I want to get the paramenter that not exsist at both list.
Here is my code:
if { $x == ""} {
puts "x is empty"
set x $i
continue
} else {
foreach i $io {
set y ""
puts $writefile1 "pin...
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
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...
i have another question:
what happen if my list is i get from a database which i set it to
foreach part $partno{
set count ""
set count [<command> $partno]
}
set y 1
foreach x count{
if $x>=$y {
set y $x
} else {
set y $y
puts $y
}
}
i want to get max value from the list.
please advice.
hi,
I am new to tcl language, just started 1 month ago. I need some help here:
I want to compare the element in the list and get the biggest value and store it. What command should i use?
numberlist [15 30 22 75 50 30A 150 110]
Please advice
Thanks!
My code is as below
set devicelist ""
set readdevice [open "device.txt" r]
while {[gets $readdevice linenew] != -1} {
lappend devicelist $linenew
}
puts $devicelist
and the result is
device1 device2 device3 { device4 } { device5 } { device5 }
Question 1
why my result sometime with curly...
Hi,
I am trying to run the marco in the excel sheet using TCL script.
Below code is trying to open multiple csv file and run the marco to combine the 2 csv file into one excel sheet
package require tcom
set excel [::tcom::ref createobj Excel.Application]
set workbooks [$excel Workbooks]...
Thanks!
i try to delete all file in the directory then i use
file delete {$allsheet}
but it cannot delete all the file.
Here is mycode
set contents [glob -nocomplain *.txt]
set x [llength $contents]
puts $x
while {$x > 0} {
set contents [glob -nocomplain $file *.txt]
foreach item $contents...
how to delete a file with spacing?
example:
Hello world.txt
I use the command
file delete Helloworld.txt
the file cant be delete
Can you show me a way?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.