Calculator

By raYmad on Dec 21, 2004

I was bored, and made this for the sense of nothing.
There is 2 ways to use it:

/calc x + y
or
Right-click in channel -> Calculator

I was so bored that I actually made colors n stuff.
Hope you like it.

menu channel {
  Calculator:/calc $$?="Enter first number" (X) + $$?="Enter second number to add (Y)"
}
alias calc {
  echo -a 11-----3---9---------------
  echo -a 9THE CALCULATOR
  echo -a 11-----3---9--------------------
  set %equal $calc($1)
  inc %equal $calc($3)
  echo -a $1 + $3
  echo -a =
  echo -a %equal
  echo -a 11-----3---9--
}

Comments

Sign in to comment.
Sigh_   -  Dec 23, 2004

Covers everything? How about modulo, exponents and parentheses for complex operations? alias calculate { echo -a Answer: $calc($1-) } - raYmad, good work, fun alias

 Respond  
raYmad   -  Dec 22, 2004

Darthreven, you see... i was bored AND lazy.

 Respond  
DarthReven   -  Dec 21, 2004

Novel idea but, this might be alittle better alias calculate { if ($2 == $chr(43)) { echo -a Answer: $calc($1 + $3) | halt } | elseif ($2 == $chr(45)) { echo -a Answer: $calc($1 - 3) | halt } | elseif ($2 == $chr(42)) { echo -a Answer: $calc($1 * $3) | halt } | elseif ($2 == $chr(47)) { echo -a Answer: $calc($1 / $3) | halt } } that covers everything

 Respond  
Yoinx   -  Dec 21, 2004

Umm... its a bit limited dont you think?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.