:D
!math - for notice
@math - for public (channel)
<+Spoofing> @math 2pi
<+dfgsd> ~= 6.283185 ( Hex: 0x06.487ECFE9B7BF; Oct: 0006.2207731772333677; Bin: 00000110.010010000111111011 )
on *:TEXT:?math *:#: {
if ($0 > 1) {
var %math = $bytes($calc($replace($mid($rawmsg,$calc($pos($rawmsg,:,2) + 7)),pi,$+(*,$pi))),bd)
if (%math) {
var %quote = return
if (!* iswm $1) var %quote = notice $nick
elseif (@* iswm $1) var %quote = msg #
%quote ~= %math ( Hex: $+(0x,$base(%math,10,16,2),;) Oct: $+($base(%math,10,8,4),;) Bin: $base(%math,10,2,8) )
}
else {
msg # $+($nick,:) I don't know.
}
}
else {
msg # $+($nick,:) Use !math <expression> or @math <expression> (for public)
}
}
http://es.wikipedia.org/wiki/Sistema_binarioany particular reason why you linked to a spanish page, lol?
Conscious, $!chan evaluates to produce the string $chan. the exclamation mark is used, in general, to escape identifiers so they aren't interpreted as code. try this:
//echo -a $chan -- $!chan -- $!!chan -- $!identifier($me) -- $!identifier( $me )
Teen, there is a big difference between the binary representation of a real number and the binary representation of a string of ASCII text (what those 3 websites deal with). the first concept is central to understanding the binary numeral system. check out:
jaytea, i dont know if this make difference, i know the binary system, and how it works, i tried on 3 differents websites and all them showed the same result without any dot, and different from that result
http://www.easycalculation.com/ascii-hex.php
http://www.stringfunction.com/binary-hex.html
http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp
Conscious, why would that make a difference? # evaluates as $chan does and produces the correct channel name. if you had said "$chan is actually documented as returning the channel associated with an event" then you would have had a point. however, # is also documented albeit not as clearly ("refers to the channel you are currently on") but thankfully the # symbol is one of the first thing newcomers to scripts encounter.
personally, i find the # more readable and noticeable in that if i'm scanning through a bunch of code, the # stands out as representing an 'output line' more so than $chan. in this particular case, i don't think there are compelling reasons to prefer one style over the other.
Teen, that doesn't really make sense. binary is a numeral system, just like the decimal system with which we typically count and perform arithmetic. is 11237.81 not a valid number because we can't readily transform it into a string? the converter you mentioned clearly does not take in binary numbers; rather, it takes in a string of 8-digit binary integers.