@# Quotes DB     useful, funny, interesting





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



Comments:

<0> ;= 34
<1> Gotisch: #73 (stdout) 7 + ?? = 34
<0> ;27
<1> Gotisch: #74 (1189 clicks) Tcl error: can't read "res": no such variable
<0> arg
<2> hehe :>
<0> why?
<3> ;proc ! { num } {#(c) by Gotisch; if {[info exists ::result]} {return [$num]}; if {![string is integer $num]} { return }; #Create a random num.; set rand [expr {int(rand()*$num)}]; set res [expr {$num-$rand}]}
<1> Pixelz: #78 (503 clicks) Tcl:
<3> ;! 2
<0> men i give up
<3> ;proc foo { num } {#(c) by Gotisch; if {[info exists ::result]} {return [$num]}; if {![string is integer $num]} { return }; #Create a random num.; set rand [expr {int(rand()*$num)}]; set res [expr {$num-$rand}]}
<0> still i think it was a nice idea
<1> Pixelz: #80 (504 clicks) Tcl:
<3> ;foo 2
<1> Pixelz: #82 (400 clicks) Tcl:



<3> hmm
<3> well
<4> what'ya trying to do exactly ?
<0> its a game
<0> you do = number
<0> and then you have to find the right multiplication
<3> paste works fine withoung having to mess it up with newline
<3> oh
<2> i try this, but first i try to compress the code a litte bit ;)
<0> lets try it again :)
<0> proc = { num } {
<0> if {[info exists ::result]} {return [$num]}
<0> if {![string is integer $num]} { return }
<0> set rand [expr {int(rand()*$num)}]
<0> set res [expr {$num-$rand}]
<0> set ::result $res
<0> proc $res { args } {
<0> if {[info exists ::result]} { unset ::result; rename [lindex [info level [expr {[info level]-1}]] 0] {} };= [expr {int(rand()*100)}];}
<0> eval $new
<0> set h [string repeat "?" [string length $res]]
<0> puts "$rand + $h = $num"
<0> }
<0> arg!
<0> error in it
<0> why!
<0> why didnt i remove the eval $new?
<0> ok now really last try
<0> proc = { num } {
<0> if {[info exists ::result]} {return [$num]};if {![string is integer $num]} { return };set rand [expr {int(rand()*$num)}]
<0> set res [expr {$num-$rand}];set ::result $res
<0> proc $res { args } {if {[info exists ::result]} { unset ::result; rename [lindex [info level [expr {[info level]-1}]] 0] {} };= [expr {int(rand()*100)}];}
<0> set h [string repeat "?" [string length $res]]
<0> puts "$rand + $h = $num"
<0> }
<0> ;unset ::result
<1> Gotisch: #104 (421 clicks) Tcl error: can't unset "::result": no such variable
<0> ;= 34
<1> Gotisch: #105 (stdout) 19 + ?? = 34
<0> ;15
<1> Gotisch: #106 (stdout) 28 + ?? = 69
<0> ;41
<1> Gotisch: #107 (stdout) 23 + ?? = 94
<0> ;71
<1> Gotisch: #108 (stdout) 5 + ? = 10
<0> ;5
<1> Gotisch: #109 (stdout) 24 + ?? = 53
<4> info procs 4*
<4> ; info procs 4*
<1> BL4DE: #111 (545 clicks) Tcl:
<0> it deletes the proc m8
<0> thnx CyBex_ btw. :D
<4> oh, i was thinking something else
<2> ; info body 29
<1> CyBex_: #115 (423 clicks) Tcl: if {[info exists ::result]} { unset ::result; rename [lindex [info level [expr {[info level]-1}]] 0] {} };= [expr {int(rand()*100)}];
<4> just ignore :)
<0> now we need to add the other calculations
<0> - * /
<0> :]
<0> ;29
<1> Gotisch: #120 (stdout) 0 + ?? = 14
<0> ;14



<1> Gotisch: #121 (stdout) 15 + ?? = 36
<0> ;26
<1> Gotisch: #122 (3473 clicks) Tcl error: invalid command name "26"
<0> ups
<0> 16
<0> why doesnt this work now?
<0> ;set ::result
<1> Gotisch: #126 (189 clicks) Tcl: 21
<0> ;21
<2> ; 21
<1> Gotisch: #127 (stdout) 56 + ?? = 95
<1> CyBex_: #128 (3636 clicks) Tcl error: invalid command name "21"
<4> cause u cant calculate ?
<0> no i mean
<0> 16 was right
<2> sure, he can't
<0> but he didnt stdout
<0> because i didnt use ; in front
<2> where?
<4> [20:50:46] <@Safe_Tcl> Gotisch: #121 (stdout) 15 + ?? = 36
<0> [20:51:26] [+Gotisch] 16
<4> that's 21
<4> :)
<2> !
<0> oh
<4> u horse
<0> ups
<0> :]
<2> ; expr 36-15
<1> CyBex_: #145 (230 clicks) Tcl: 21
<0> xyeye
<0> :P
<0> ok
<0> now lets add diferent sorts of calculations
<4> !addwhat Gotisch % <+Gotisch> 15 + 16 = 36
<0> hey even einstein was bad in maths :P
<4> doesnt mean we cant laugh at him :)
<0> ;set b +
<1> Gotisch: #153 (631 clicks) Tcl: +
<0> ;expr 4 $b 3
<1> Gotisch: #154 (286 clicks) Tcl: 7
<0> nice
<2> set b [string index "+-*/" [expr int(rand()*4=]]
<2> ups.. typo
<2> and make sure, no division by zero ;)
<0> its even harder
<0> because
<0> i first have to do the contrary
<0> to get the solution
<2> set rand [expr {int(rand()*$num)+2}]
<2> oh, better -2 :>
<2> its your quiz :>
<2> i go drive/play some gpl..
<4> ; expr {int(rand()*$num)}
<1> BL4DE: #167 (520 clicks) Tcl error: can't read "num": no such variable
<4> ; expr {int(rand()*1)}
<1> BL4DE: #168 (251 clicks) Tcl: 0
<4> u should maybe limit the * a lil more, might be a lil hard to figure out what 54 * 67 is :)
<0> true
<0> lol
<0> maybe first + and -
<4> :)
<2> hehe, cheat in an other tcl chan ;)
<4> is he crossposting ? :)
<2> not atm :)
<0> ?
<0> whats crossposting?
<4> proc NewNum {} {
<4> set char [string index "+-/*" [expr {int(rand()*4)}]]
<4> foreach {num1 num2} "[expr {int(rand()*99)+1}] [expr {int(rand()*99)+1}]" {}
<4> puts "$num1 $char $num2 = [expr $num1 $char $num2]"
<4> proc $num2 {} { NewNum }
<4> }
<4> ; NewNum


Name:

Comments:

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






Return to #tcl
or
Go to some related logs:

#computers
#solaris
jersey inseid
reverse dns mydns in.arpa
bitchfights
flirtbill
exploitedteens strongbox
#unixhelp
#dreamweaver
#sql



Home  |  disclaimer  |  contact  |  submit quotes