bind pub - .hitung calc
set pi 3.1415926535897932
set e 2.71828182845905
set g 9.81
proc calc {nick host handle channel arg} {
global pi e g
if {$arg != "" && ![string match "\[" $arg] && ![string match "\]" $arg]} {
putserv "PRIVMSG $channel :eh $nick hasilnya yaitu yakni adalah ialah [expr $arg]"
} else {
putserv "NOTICE $nick :12Caranya .hitung 1+1 --- konstanta: \$pi \$e \$g --- fungsi: abs(), acos(), asin(), atan(), atan2(), ceil(), cos(), cosh(), exp(), floor(), fmod(), hypot(), log(), log10(), pow(), round(), sin(), sinh(), sqrt(), tan(), tanh() --- \[ dan \] tidak boleh dipakai dalam expresi."
}
}
Saturday, August 27, 2011
calculator.tcl
Labels:
tCL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment