| |
| |
| |
|
Page: 1 2
Comments:
<0> ;expr int(rand()*{1 2} <1> anc-: #1869 (10591 clicks) Tcl error: syntax error in expression "int(rand()*{1 2}": missing close parenthesis at end of function call <0> ;expr int(rand()*2 <1> anc-: #1870 (285 clicks) Tcl error: syntax error in expression "int(rand()*2": missing close parenthesis at end of function call <0> ;expr int(rand()*2) <1> anc-: #1871 (233 clicks) Tcl: 0 <0> ;expr int(rand()*{1 2}) <1> anc-: #1872 (24590 clicks) Tcl error: can't use non-numeric string as operand of "*" <0> how do i not make 0 count as a result <2> ;[split "AAAA | BBBB" "|"] <2> ;split "AAAA | BBBB" "|" <1> [9]: #1875 (11595 clicks) Tcl: {AAAA } { BBBB} <2> ;split "AAAA|BBBB" "|" <1> [9]: #1876 (152 clicks) Tcl: AAAA BBBB <3> ;expr int(rand()*2) <1> Gotisch: #1877 (226 clicks) Tcl: 1
<3> you try more then just once... <0> ? <4> be careful what you wish for <0> Gotisch my question again: how do i not make 0 count as a result <4> if {$result==0} { do again? } <4> :P <3> ;expr { 1+ int(rand()*2)} <1> Gotisch: #1884 (203 clicks) Tcl: 2 <4> ahh <4> or that <4> :D <3> ;expr { 1+ int(rand()*1)} <0> yea <1> Gotisch: #1888 (203 clicks) Tcl: 1 <3> actually <3> since you want either 1 or 2 i gues <0> yea <3> ;randnum <1> Gotisch: #1893 (2185 clicks) Tcl error: invalid command name "randnum" <3> ;rand <1> Gotisch: #1894 (358 clicks) Tcl error: wrong # args: should be "rand maxint" <3> ;rand 1 <1> Gotisch: #1895 (150 clicks) Tcl: 0 <3> ;info body rand <1> Gotisch: #1896 (7765 clicks) Tcl: expr { int(rand()*$maxint) } <3> ;proc rand {min {max 0}} { if {$max < $min} { set max $min; set min 0 }; return [expr {$min + int(rand()*$max)}] } <1> Gotisch: #1897 (2624 clicks) Tcl error: Attempt to redefine command DENIED! =P <3> jesus <3> ;proc rrand {min {max 0}} { if {$max < $min} { set max $min; set min 0 }; return [expr {$min + int(rand()*$max)}] } <1> Gotisch: #1899 (13709 clicks) Tcl: <3> ;rrand 4 <1> Gotisch: #1900 (739 clicks) Tcl: 3 <3> ;rrand 5 9 <1> Gotisch: #1901 (450 clicks) Tcl: 7 <0> :) <5> //server -m irc.chatw.net #chatw <6> morning <6> Can anyone tell me why: expr 1448636649 * 31 = 1,958,063,159... instead of 44,907,736,119? <7> ;expr 1423432434234 * 232 <1> [GRiMMY]: #1908 (272 clicks) Tcl: 330236324742288 <7> ;expr 1423432434234 * 567 <1> [GRiMMY]: #1909 (224 clicks) Tcl: 807086190210678 <7> no idea <7> ;expr 1448636649 * 31 <1> [GRiMMY]: #1911 (247 clicks) Tcl: 1958063159 <8> ; expr 1448636649 * 31.0 <1> iwi: #1912 (237 clicks) Tcl: 44907736119.0 <7> hmmm <7> lol <6> was thinking it had something to do with the result being greater than max-int <7> yeah just make it a floating point <6> but 1958063159 is the correct answer I'm looking for, but I need to reproduce that in another language <7> hmm oh <6> so I'm trying to find what exactly is happending to 44,907,736,119 to make it 1,958,063,159 instead <7> i dont understand how it gets to that value =| <6> max-int = 2,147,483,647 <7> ;expr [expr 1448636649 * 31.0] / [expr 1448636649 * 31] <1> [GRiMMY]: #1922 (492 clicks) Tcl: 22.9347740458 <7> hmmm <9> get/write a tcl lib or script for arbitrary math
<7> yeah what he said <9> search on wiki.tcl.tk, they got a few links for that <8> ;expr 1448636649 * int(31) <1> iwi: #1927 (319 clicks) Tcl: 1958063159 <8> ;expr 1448636649 * wide(31) <1> iwi: #1928 (242 clicks) Tcl: 44907736119 <6> hehe, I just downloaded tcl last night, I'm trying to port a piece of code to Vb6.0 but I was able to learn enough of tcl last night to come up with why the equation was breaking in vb, it's that part <6> in vb 1448636649 * 31 = 44,907,736,119 <6> but in vb I need it to = 1958063159 <8> ;expr int(44907736119) <1> iwi: #1932 (226 clicks) Tcl: 1958063159 <8> convert to int <7> lol <8> ;) <7> =) <7> if i ran the bots i'd add ya to auto-voice <7> but BL4DE or yoe will do that <7> wont you BL4DE or yoe! <4> shake it, dont break it! <10> Gummibear <10> wops <4> you call [GRiMMY], Gummibear? such a sweet nickname :) <10> /msg Gummibear p***wd urp*** <10> yeah :) <10> watch too much disney :( <4> :P <10> might be p*** and not p***wd actully <6> thanks guys <11> hi all <12> =) <11> where can I find a small tcl script to parse log in irc and save them in .txt? <12> www.egghelp.org if one exists. <11> already found one on a french site but can't find it anymore :( <12> You could try learning Tcl and write one yourself.. =) <12> Tcl is like chess, you can learn the basics fairly easily.. <11> true :) <11> make me insane <11> I've found one 1 year ago and now can't find it :( <13> whats a good weather tcl? the one that uses .wz <13> then zipcode <10> maybe try in a chan which is acutlly about that :) <7> haha <14> "good weather tcl" ... hmm <14> i use active state, rain or shine... <15> how about going outside for a change, then you'll know what weather it is LZ. <16> no wonder he left <16> :> <14> the abuse <17> can anyone help me with an regular expression problem for tcl? <10> aint gonna be solved that way ;) <17> well if anyone would like to try I will say what's the problem is <17> well ok I will tell it anyway if anyone could help <10> we cant read minds damit <17> I know <10> as topic says, dont ask to ask :) <18> look @ topic <17> I have a subword <17> somehting like "sad" <17> I would like to check in string for that word <17> if it is surrounded by nonalphabet chars <17> like -/$% and so on <17> or if the entire string is "sad" <17> I can't figure out the right mask for regexp <0> use string match <18> was thinking the same <17> yep but string can't isolate surrounding chars <0> ? <17> I want to have true only if "sad" is surrounded with non-alphabet chars <17> like -sad- <17> or =sad= <17> or ^sad^ <17> see?
Return to
#tcl or Go to some related
logs:
#stocks #politics #delphi #beginner #windowsxp military protopipe ntpd_initres[165] will Vista be compatible with my LCD monitor? #stocks #goal
|
|