@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> what looks wrong about this guys
<0> if { $theChannel == #SuperTorrents } {
<0> note "sorry cant do this in this channel"
<0> }
<1> #SuperTorrents should be "#SuperTorrents" or {#SuperTorrents}
<0> rgr thanks
<0> seems that when i changed it to "#SuperTorrents" it doesnt listen haha
<1> Consider using this instead: if {[string equal -nocase $theChannel {#SuperTorrents}]} {
<0> i had it jacked up i forgot to put else
<0> thank you good sir
<0> what's the purpose of -nocase?
<1> makes it case-insensitive.
<0> ohh, thanks
<2> hi,where can i find the newest tcl compiled dll files?
<3> google activetcl :)



<4> what cmd within tcl will invoke the mv command
<4> cuz i get this error "nvalid command name "mv"
<4> [R] 200- while executing
<5> ? exec
<6> exec -> http://Tcl.Tk/man/tcl8.5/TclCmd/exec.htm
<4> ok i used the exec with it
<4> but now i get "couldn't create error file for command: no such file or directory"
<5> are you trying to redirect or pipe output from rm?
<5> is there anyone reason you're using rm over "file rename"
<4> u mean mv
<5> er yes, hehe sorry
<5> don't know why i wrote rm..twice
<7> ummm
<7> why use exec for thjat
<7> use the file comamnds
<7> ? file
<6> file -> http://Tcl.Tk/man/tcl8.5/TclCmd/file.htm
<5> is there an echo in here? :P
<7> you want: file rename
<7> could be
<7> lemme check
<4> mv -f [pwd]/$origin $dest/
<4> yes
<7> lol use file commands
<7> don't exec mv -f
<7> that's just crazy
<4> what do i use instead i jus read that and dont see it
<5> file rename -force -- source dest
<4> it says "error renaming"
<4> permission denied
<7> that's a shell issue
<4> u mean chmod
<7> check the file permissions and the permissions related to that from the egg user
<4> isnt this command invoked with root
<4> the tcl cmd that is
<7> whatever your tcl inerp is running as
<7> is what the command is run as
<4> ok i chmod the dir 777 and it works now
<4> thanks much guys
<7> well i wouldn't leave it 777 unless it's a temp dir
<7> and even then not sure it's a great idea
<4> ok
<4> isnt there a cmd touch as well?
<4> to create the file
<7> not specifically
<7> but you can make one...
<7> proc touch {fname} {set fid [open $fname w]; close $fid}
<8> Gn8 mates
<7> open a file channel...close it with no input it will create a blank file
<7> night
<8> :)
<9> or just: close [open $fname w]
<10> FedEx cut's corners wherever they can
<10> *harr harr*
<4> lephrechau: thx a lot sorry had to go on road but much appreciated, thanks as well fedex
<1> =)
<11> how do i get an array with the content of a string in which the vars are divided by spaces?
<1> eh?



<11> a string contains some arguments, and theyre divided by spaces. i want those into an array instead of being in a string :p
<1> erm.. How 'bout this instead..
<11> just wanted to know if there was some string-to-array kind of function, or simple way. right now im using a for while loop
<1> ;set string "A string with spaces."
<6> FireEgl: #1623 (905 clicks) Tcl: A string with spaces.
<1> ;set list [split $string]
<6> FireEgl: #1624 (292 clicks) Tcl: A string with spaces.
<1> ;lindex $list 0
<6> FireEgl: #1626 (203 clicks) Tcl: A
<1> ;lindex $list 1
<6> FireEgl: #1627 (204 clicks) Tcl: string
<1> ...and so on.
<11> thats how im doing it
<11> and i use the for while loop to put them into an array.
<1> What are you nameing the arrays?
<11> nothing really
<1> uh, you have to name them.. Well, show me you code then..
<11> numbers
<1> Well why not use a list, and lindex them instead.. it's probably faster than putting it into an array since it's already in a format you can pick stuff out of.
<11> ;for {set i 0} {$i < [llength $lis]} {incr i} {array set arr [list $i [lindex $lis $i]]}
<6> omes: #1640 (1791 clicks) Tcl error: can't read "lis": no such variable
<11> ;for {set i 0} {$i < [llength $list]} {incr i} {array set arr [list $i [lindex $list $i]]}
<6> omes: #1641 (2491 clicks) Tcl:
<1> Yah, that's dumb! =P
<11> hehe :p
<11> ill use the list then. thanks FireEgl :)
<1> Just make sure you [split] the string to make it a list first. Don't go lindex'ing on a string..
<12> ****ing headache
<12> ouchie
<13> maybe an idea to do smth like: split [string map {\{ \\{ \} \\}} $string]
<13> if you intend to use string match, you may want to escape [ and ] too
<13> *not that i am recommending using string match for anything ;)
<14> oO
<14> ; set i 0; foreach arg {this are the arguments} { incr i; set arguments($i) $arg }; array get arguments
<6> Gotisch: #1707 (14592 clicks) Tcl: 4 arguments 1 this 2 are 3 the
<14> why do people use for with lists
<14> i nether will understand it
<15> lol
<15> Gotisch
<14> grimmy
<15> i use it for a reason
<14> aha
<15> lemme think of the explanation
<15> oh ok, i'll show you
<15> set list [list a b c d e f]
<6> [GRiMMY]: #1717 (256 clicks) Tcl: a b c d e f
<15> infact
<15> http://paste.anbcs.com/4243
<15> look at the recursive function
<15> getPermutations
<15> i have to remove part of the list and then send to the proc again
<15> if i use for i already have the index to remove
<15> if i use foreach i'd have to lsearch to get the index
<15> therefore for is more efficient
<15> also, thats the **** i was talkin about C for the other day
<15> i need a TCL module to do that either recursively or lexographically
<14> oO
<14> for linux?
<16> for -> http://www.tcl.tk/man/tcl8.4/TclCmd/for.htm
<15> Gotisch, for windoze and linux
<14> im not that good in tclmodule writing
<15> lol
<15> its only a simple loop but i got no idea how to convert the arguments from tcl into a list
<15> i mean from tcl into an array or wahtever
<17> mmm...i tried showing you how to do it with character arrays ... i think i fail thou :x
<15> you tried to show me?
<15> and the elements in the list wont always be one character
<17> uhm, so, you dont declare it as one character...the way i did it, you dont declare the length at all, it allocated it's own memory as it went along :|


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #tcl
or
Go to some related logs:

busty heavys
skr0oface
#netbsd
#solaris
stardrag flash
#sex
#nhl
#solaris
#delphi
#politics



Home  |  disclaimer  |  contact  |  submit quotes