| |
| |
| |
|
Page: 1 2 3 4 5 6 7
Comments:
<0> lrange? <1> lrange -> http://Tcl.Tk/man/tcl8.5/TclCmd/lrange.htm <2> k well nevermind it, its my headeache :) <0> ... <3> proc realcalc {data} { set data [string map [list - 1] $data; foreach {a b c d e f g h i j k l} $data { lappend retval "$a $b $c $d $e $f $g $h$i $j $k $l" }; return $retval } <3> ;proc realcalc {data} { set data [string map [list - 1] $data; foreach {a b c d e f g h i j k l} $data { lappend retval "$a $b $c $d $e $f $g $h$i $j $k $l" }; return $retval } <1> BL4DE: #177 (302 clicks) Tcl: <3> ; realcalc 5 6 0 - 13 19 24 0 - 35 - - 7 6 1 - 0 33 - 40 - 53 - 25 2 <1> BL4DE: #178 (1963 clicks) Tcl error: missing close-bracket <3> ;proc realcalc {data} { set data [string map [list - 1] $data]; foreach {a b c d e f g h i j k l} $data { lappend retval "$a $b $c $d $e $f $g $h$i $j $k $l" }; return $retval } <1> BL4DE: #179 (9542 clicks) Tcl: <3> ; realcalc "5 6 0 - 13 19 24 0 - 35 - - 7 6 1 - 0 33 - 40 - 53 - 25 2" <1> BL4DE: #180 (11935 clicks) Tcl: {5 6 0 1 13 19 24 01 35 1 1} {7 6 1 1 0 33 1 401 53 1 25} {2 } <0> what does that have to do with multiplying stuff? <3> i got no idea :) <3> damn that way was ugly
<3> everyone clear screen <4> anc- its easy if you got all the infos <4> but first you say its only numbers <4> and then sudenly there are - in it <3> and then im like, wtf ? and someone else as woot <4> if i already read stuff like that <4> " numbers like -" <4> as if - was a number \o/ <4> ; incr - <1> Gotisch: #192 (236 clicks) Tcl error: can't read "-": no such variable <4> hey why doesnt this work <4> - i s a number! <4> fgs! <0> what I don't understand is that whole 1-12 stuff <0> I thought I got the multiplication part <5> lol <0> but then it turns into something completely different which from my perspective can be solved with lrange and has nothing to do with multiplication at all <0> well it was a potentially interesting question, but now it's just a mess :p <3> u can just msg me and explain in danish if that's easier :) <5> and then BL4DE will explain in here <5> and then the race to code it is on <3> we need a pointsystem, easier for me to say "IN YOUR FACE" <5> yeah lol <0> I really wasn't trying to turn this into a pissing contest, for refrence <3> i rock@VB :) <5> make me a program then BL4DE <4> hey point system? <5> real simple <4> like we get points :>? <5> just might take you a while <3> Pixelz: anyone taking it as that ? <5> yes like every letter you function after a ; that doesnt receive a tcl error = 1point <5> arg <5> "every function you type" <5> not "every letter you function" <0> ;return 1 <1> Pixelz: #218 (124 clicks) Tcl: 1 <1> Pixelz: #219 (123 clicks) Tcl: 1 <5> lol <0> ;return 20 <1> Pixelz: #221 (135 clicks) Tcl: 20 <0> 20 points! <3> i challenge you to a race around the world Pixelz <2> Gotisch well it is just numbers <2> all - will be regsubbed to 1 <2> as i said too <5> woot <4> -.- <5> 14 of 21 forms complete <3> what'ya making dood <5> 21 = what my design process decided on, that could increase <5> project for college
<5> have to create a system to manage a companys daily jobs <0> I thought you where working on the [GRiMMY] Point System (c) <0> aka GPS <5> =) <4> ;proc funkycalc { list num } { set a [llength $list];if [set b [incr [expr {$a%$num}] -1]] > -1} { set list [lreplace $list end-$b end]}; set pre "[string repeat "- " [incr num -1]]var";set result 1;foreach $pre $list { set result [expr {$result*$var}]};return $result} <1> Gotisch: #237 (515 clicks) Tcl error: wrong # args: should be "::pubsafetcl::Proc interp name arguments body" <4> ;proc funkycalc { list num } { set a [llength $list];if {[set b [incr [expr {$a%$num}] -1]] > -1} { set list [lreplace $list end-$b end]}; set pre "[string repeat "- " [incr num -1]]var";set result 1;foreach $pre $list { set result [expr {$result*$var}]};return $result} <1> Gotisch: #238 (427 clicks) Tcl: <3> there's a light prob with GPS(tm) its already a trademark <5> if anyone wants some maths functions for tcl i got a few =) <5> gonna create a few more soon maybe <4> ;funkycalc "1 2 3 4 5 6 7 8 9" 4 <1> Gotisch: #242 (22089 clicks) Tcl error: can't read "1": no such variable <0> [PS then :p <4> arrr <4> ;funkycalc "1 2 3 4 5 6 7 8" 4 <1> Gotisch: #244 (604 clicks) Tcl error: can't read "0": no such variable <5> maybe one for the iterative formula <4> ;proc funkycalc { list num } { set a [llength $list]; set b [incr [expr {$a%$num}]; if {$b > -1} { set list [lreplace $list end-$b end]}; set pre "[string repeat "- " [incr num -1]]var";set result 1;foreach $pre $list { set result [expr {$result*$var}]};return $result} <1> Gotisch: #246 (397 clicks) Tcl: <4> ;funkycalc "1 2 3 4 5 6 7 8" 4 <1> Gotisch: #247 (413 clicks) Tcl error: missing close-bracket <4> ;set errorInfo <1> Gotisch: #248 (124 clicks) Tcl: missing close-bracket <1> Gotisch: #248 (124 clicks) Tcl: while compiling <1> Gotisch: #248 (124 clicks) Tcl: "set b [incr [expr {$a%$num}]; if {$b > -1} { set list [lreplace $list end-$b end]}; set pre "[string repeat "- " [incr num -1]]var";set result 1;forea..." <1> Gotisch: There's 6 lines, but I'm not gonna show you the rest of them! =P <4> great <4> ;proc funkycalc { list num } { set a [llength $list];set b [incr [expr {$a%$num}] -1]; if {$b > -1} { set list [lreplace $list end-$b end]}; set pre "[string repeat "- " [incr num -1]]var";set result 1;foreach $pre $list { set result [expr {$result*$var}]};return $result} <1> Gotisch: #250 (378 clicks) Tcl: <4> ;funkycalc "1 2 3 4 5 6 7 8" 4 <1> Gotisch: #251 (997 clicks) Tcl error: can't read "0": no such variable <4> work! <4> grrr <4> where do i tell him to read 0? <3> ;string repeat "- " 4 <1> BL4DE: #255 (238 clicks) Tcl: - - - - <4> ;proc funkycalc { list num } { <4> ;set a [llength $list]; <4> ;set b [incr [expr {$a%$num}] -1]; <4> ;if {$b > -1} { set list [lreplace $list end-$b end]}; <4> ;set pre "[string repeat "- " [incr num -1]]var"; <4> ;set result 1; <1> Gotisch: #256 (141 clicks) Tcl: 1 <4> ;foreach $pre $list { set result [expr {$result*$var}]}; <4> ;return $result <1> Gotisch: #257 (264 clicks) Tcl error: can't read "pre": no such variable <4> ;} <1> Gotisch: #258 (137 clicks) Tcl: 1 <4> hu? <3> ; proc funkycalc2 {list num} { set r 1; foreach {[string repeat "- " [expr $num - 1]v} { if {$v != ""} { set r [expr $v * $r] } } return $r } <1> BL4DE: #260 (314 clicks) Tcl: <5> BL4DE <5> help meh with format <4> doesnt that submitting of function work anymore? <3> ; funkycalc2 "1 2 3 4 5 6 7 8" 4 <1> BL4DE: #264 (382 clicks) Tcl error: wrong # args: should be "foreach varList list ?varList list ...? command" <5> 0.11222313213213 to 5dp? <5> i hate format <3> uh ? <6> wtf <3> 5 ? <6> lol <3> ; proc funkycalc {list num} { set r 1; foreach {[string repeat "- " [expr $num - 1]v} $list { if {$v != ""} { set r [expr $v * $r] } } return $r } <1> BL4DE: #271 (384 clicks) Tcl: <0> %.5f? <3> ; funkycalc "1 2 3 4 5 6 7 8" 4 <1> BL4DE: #273 (2694 clicks) Tcl error: invalid command name "1" <3> sry Gotisch :) <6> why is like 60% of new tcl devs doing pre <6> ? <0> ;format %.5f 0.11222313213213 <1> Pixelz: #277 (22577 clicks) Tcl: 0.11222 <3> ; proc funkycalc {list num} { set r 1; foreach {[string repeat "- " [expr $num - 1]]v} $list { if {$v != ""} { set r [expr $v * $r] } } return $r }
Return to
#tcl or Go to some related
logs:
keyboard goes too fast #politics #computers 11543.32
#beginner codec 4cc i263 #unixhelp #unixhelp 6arab renihs livecd vserver
|
|