Top

/chr


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  4.8
Scores Submitted  4
Date Added  Aug 16, 2005
Last Updated  Sep 23, 2005
Tags  ascii  character 
  Bookmark and Share

Introduction

Use /chr <letter etc.> to find the $chr code for that chr.

Example: /chr A would return 65.

Very simple, small code, and can be done manually, but it makes it a bit easier.


Grab the Code

Comments

  (8)  RSS
xDaeMoN
Comments: 696
 
mIRC Snippet:  /chr
Posted on Aug 16, 2005 2:26 pm
You can also simplify the code by using $iif. ;)
QuickStep
Comments: 123
 
mIRC Snippet:  /chr
Posted on Aug 16, 2005 4:37 pm
like xdaemon said, the script with iif would look like:
alias chr {
var %asc = $iif($1,$v1,$$?="Character to find value of:")
echo -a The ascii value of %asc is $asc(%asc) $+ .
}
the reason to still set the variable is due to the fact that you repeat the variable twice in the echo sentence, making this way the shortest
supergeo
Comments: 256
 
mIRC Snippet:  /chr
Posted on Aug 17, 2005 4:21 pm
Eh, mine still works, and that's the thing that really matters. That it fulfills it's job.
xDaeMoN
Comments: 696
 
mIRC Snippet:  /chr
Posted on Aug 17, 2005 5:38 pm
Yes and the way it was coded matters too. Ours were just suggestions on how to improve your snippet.
supergeo
Comments: 256
 
mIRC Snippet:  /chr
Posted on Aug 17, 2005 8:28 pm
Well, it seems like people are rating snippets anymore just by the way the code is. Sure, if it's nasty you can deduct a point or 2, but really, if it works, you shouldn't deduct points just because it's not your style of scripting.
xDaeMoN
Comments: 696
 
mIRC Snippet:  /chr
Posted on Aug 17, 2005 8:40 pm
As I said before, not just because the script works it should be given a high rating but we also look at how it was coded and see if it does deserve the rating.
supergeo
Comments: 256
 
mIRC Snippet:  /chr
Posted on Aug 19, 2005 11:09 am
I understand, but lots of people see the code, think it's wrong because it's not the way they'd do it, and rate it poorly.
Yoinx
Comments: 424
 
mIRC Snippet:  /chr
Posted on Aug 19, 2005 11:24 am
//echo -a $asc(chr)

I dont really see a point to complicate it beyond that.

Please Register or Login to start posting comments.
Bottom