IRC Can Count

By `Node_ on Mar 06, 2004

A very simple, and pointless snippet that will count from n to N and display it as:

Starting counting...
1/5
2/5
3/5
4/5
5/5
Finished counting...

As I said, it is pretty pointless...

alias count {
  %x = $$?="Enter number to count from"
  %y = $$?="Enter number to count to"
  if (%y <= %x) { echo 2 Invalid count sequance | halt }
  if ((%x !isnum) || (%y !isnum)) { echo 2 Invalid count sequance | halt }
  set %x $calc(%x - 1)
  echo 2 Starting counting...
  while (%x < %y) {
    inc %x 1
    echo 2 %x $+ / $+ %y  
  }
  echo 2 Finished counting...
}

Comments

Sign in to comment.
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.