@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5



Comments:

<0> __Gotisch: #2744 (277 clicks) Tcl error: different numbers of variable names and field specifiers
<1> ;scan {[YY-XX]} {\[%2i\-%c%c\]} one two three
<0> __Gotisch: #2745 (179 clicks) Tcl: 0
<1> ; puts "$one $two$three"
<0> __Gotisch: #2746 (277 clicks) Tcl error: can't read "one": no such variable
<1> well that didntwork :)
<2> hehe
<1> ;scan {[YY-XX]} {[%d-%d]}
<0> __Gotisch: #2749 (164 clicks) Tcl: {} {}
<1> ;scan {[12-XX]} {[%d-%d]}
<0> __Gotisch: #2750 (172 clicks) Tcl: 12 {}
<1> ;scan {[12-XX]} {[%d-%c]}
<0> __Gotisch: #2751 (165 clicks) Tcl: 12 88
<2> where did that 88 come from lol
<1> ;scan {[12-XX]} {[%d-%s]}
<0> __Gotisch: #2753 (203 clicks) Tcl: 12 XX\]



<1> ;scan {[12-XX]} {[%d-%c%c]}
<0> __Gotisch: #2754 (206 clicks) Tcl: 12 88 88
<1> 88 is X
<1> ;scan {[12-XX]} {[%d-[a-Z]]}
<0> __Gotisch: #2756 (171 clicks) Tcl: 12
<1> ;scan {[12-XX]} {\[%d-[a-Z]\]}
<0> __Gotisch: #2757 (164 clicks) Tcl: {}
<3> why not regexp?
<1> wanted to do it faster
<1> with scan
<1> since we know exactly how many chars it should be
<4> string match {\[??-??\]} {[01-TB]}
<0> heidel: #2762 (290 clicks) Tcl: 1
<2> string match {\[??-??\]} {[011-TB]}
<0> Nozz: #2763 (255 clicks) Tcl: 0
<1> ;scan {[12-XX]} {\[%d-[A-Z]\]}
<0> __Gotisch: #2764 (165 clicks) Tcl: {}
<1> ;scan {[12-XX]} {[%d-[A-Z]]}
<0> __Gotisch: #2765 (171 clicks) Tcl: 12
<1> ;scan {[12-XX]} {[%d-%[A-Z]]}
<0> __Gotisch: #2766 (203 clicks) Tcl: 12 XX
<1> ah
<1> he doesnt want to get the input out?
<2> no
<4> Nozz just wanted to verify the content as far as i understood from his question
<2> yes
<2> thx
<2> hest
<2> heidel even
<2> if {!(string match $site \[??-??\])} {
<2> putserv "PRIVMSG $chan :STUPID"
<2> return 0
<2> }
<2> would that work?
<4> if {![string match {\[??-??\]} $site]} {
<2> thx alot ;)
<4> first argument to string match is the pattern and you have to use braces around or \\\[, since [ has to be escaped even inside the match pattern
<1> heidel thommey s proc is fastest
<1> takes only 4 ms
<5> \o/
<4> what?
<4> what proc
<1> ; proc runde {zahl {stellen 0}} { return [expr {round(pow(10,$stellen)*$zahl)/pow(10,$stellen)}] }
<0> __Gotisch: #2783 (349 clicks) Tcl:
<1> ;runde 5.555 2
<0> __Gotisch: #2784 (657 clicks) Tcl: 5.56
<2> what does that have to do with this?
<1> im talking about the thing from before
<6> english!
<4> i dont get it either, are you looking for a fast round proc?
<4> hehe
<5> ; proc round {number {digits 0}} { return [expr {round(pow(10,$digits)*$number)/pow(10,$digits)}] }
<0> thommey: #2790 (375 clicks) Tcl:
<1> (19:29:39) (+hest) well... my procedure is faster on my comp
<5> english version of it ;)
<1> oh
<1> hest
<1> not heidel sorry
<4> ah ok
<2> hehe yea __Gotisch hest did say it was correct ;)
<1> ; round 0



<0> __Gotisch: #2798 (620 clicks) Tcl: 0.0
<1> ; round 0 -1
<0> __Gotisch: #2799 (433 clicks) Tcl: 0.0
<1> ; round 1 -1
<0> __Gotisch: #2800 (430 clicks) Tcl: 0.0
<2> [19:23:54] <hest> thommey's is faster
<2> [19:23:58] <hest> but it's in german
<2> [19:24:03] <hest> thats a big drawback
<5> lol
<2> :P
<2> well he is right tho :D
<4> lol
<1> he said that before
<6> babelfish will convert it.
<1> afterwards he said his was faster on his pc
<1> just check the timestamps
<5> <+thommey> ; proc round {number {digits 0}} { return [expr {round(pow(10,$digits)*$number)/pow(10,$digits)}] }
<5> english!
<6> who care how fast it is? :P
<1> you want to wait 3 days for your answer?
<6> if it only takes -5 second, then thats all you need.
<6> ive never seen a round take more then 15 seconds.
<5> imagine you need to round 1000000times inside a proc which is called every minute
<6> ffs in php it takes no more then 2 seconds rounding large numbers. :/
<5> THEN you care about every ms
<6> heh
<5> like reading out a huge sql-table and round
<6> ouch.
<1> ; round 2342.2323423939374293847298347298342938983239487293847293874298374 15
<0> __Gotisch: #2824 (511 clicks) Tcl: 2342.23234239
<6> thank god i dont use large databases.
<5> well, mysql is able to round itself ofcourse, but guess you would want to do it in tcl anyway :)
<6> -shrugs-
<6> thank god i only do data reports in tcl.
<6> that dont require rounding, just live states
<6> ima write that proc down tho, for my server status page im making. ;D
<3> umm
<3> doesnt format do it?
<3> format %.2f 2342.2323423939374293847298347298342938983239487293847293874298374
<0> [GRiMMY]: #2833 (229 clicks) Tcl: 2342.23
<3> format %.15f 2342.2323423939374293847298347298342938983239487293847293874298374
<0> [GRiMMY]: #2834 (233 clicks) Tcl: 2342.232342393937415
<3> ok that rounded wrong
<3> ;round 2342.2323423939374293847298347298342938983239487293847293874298374 11
<0> [GRiMMY]: #2836 (520 clicks) Tcl: 2342.23234239
<3> ;round 2342.2323423939374293847298347298342938983239487293847293874298374 15
<0> [GRiMMY]: #2837 (519 clicks) Tcl: 2342.23234239
<3> um
<3> ;round 2342.2323423939374293847298347298342938983239487293847293874298374 18
<0> [GRiMMY]: #2839 (667 clicks) Tcl error: integer value too large to represent
<3> ummm firstly it isnt an integer, its a floating point
<3> and there is no second point
<7> ;round 2342.2323423939374293847298347298342938983239487293847293874298374 15
<0> FireEgl: #2842 (504 clicks) Tcl: 2342.23234239
<7> ;round 2342.2323423939374293847298347298342938983239487293847293874298374 15
<0> FireEgl: #2843 (462 clicks) Tcl: 2342.2323423939374
<7> I upped the tcl_precision. =)
<5> hehe
<5> format does not do it, depending on your intention
<0> thommey: #2848 (180 clicks) Tcl: does
<5> % format %.2f 5.555
<5> ; format %.2f 5.555
<0> thommey: #2850 (205 clicks) Tcl: 5.55
<5> I want 5.56 there
<7> You could actually set ::tcl_precision so that it rounds to what you want, before you do any expr's, and then set it back to the original setting after.
<5> just as we learned in mathematics :)
<5> why not setting it to a max in general? :)
<7> nm what I just said about ::tcl_precision. =)
<7> I thought it only applied to what came over the decimal point.
<7> over = after
<2> how would i take the last char in a string
<2> e.g. "79237432T"
<2> i want to take the T ;)
<8> string index $var end


Name:

Comments:

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






Return to #tcl
or
Go to some related logs:

#politics
#beginner
#hardware
banat aldera
#photoshop
#windows
#red
12porn
cannot open/stat device vmware
#hardware



Home  |  disclaimer  |  contact  |  submit quotes