Top

$iseven / $isodd

Please Register to submit score.
Average Score  0.0
Scores Submitted  0
Date Added  May 19, 2008
Last Updated  May 19, 2008
Tags  even  identifier  irc  is  iseven  isodd  jonesy  jonesy44  mirc  number  odd 

Introduction

Two identifiers to tell you if a number is odd or even. Thought this up in maths today when the teacher was rambling on about some crap :-)

Anyways, more info on syntax is in the script itself, this can be used in an if statement, por example;

Code:
if ($iseven(2)) {
  ..
}


Grab the Code

Comments

  (5)  RSS
Lindrian
Comments: 694
 
mIRC Snippet:  $iseven / $isodd
Posted on May 19, 2008 1:18 pm
Code:
alias iseven {
if ($1 isnum) && (2 // $1) return $true
}
alias isodd {
if ($1 isnum) && ($2 \ $1) return $true
}

--

Thats all you need.
napa182
Comments: 775
 
mIRC Snippet:  $iseven / $isodd
Posted on May 19, 2008 1:55 pm
er nvm it keeps takeing out the second "" =/
jonesy44
Comments: 647
 
mIRC Snippet:  $iseven / $isodd
Posted on May 19, 2008 1:59 pm
That i did not know, Lindrian. xD
SnoooP
Comments: 348
 
mIRC Snippet:  $iseven / $isodd
Posted on May 19, 2008 3:04 pm
haha ;) ive been playin wiff this lol
jonesy44
Comments: 647
 
mIRC Snippet:  $iseven / $isodd
Posted on May 20, 2008 11:22 am
little things amuse little minds :P

Please Register or Login to start posting comments.
Bottom