mIRC Homepage
Posted By: rockcavera Add $rshift and $lshift - 08/09/17 03:49 AM
I believe it would be interesting for mSL to add identifiers that perform binary operators left shift and right shift, since we already have $and, $not, $or and $xor.

I know it's easy to create them by aliases, however, as already said, it would be interesting for the language to have them.

$rshift(A,B)
$lshift(A,B)

A being a number and B the number of bits displaced.

Example of aliases that do this:
Code:
alias rshift return $calc($$1 // (2 ^ $$2))
alias lshift return $calc($$1 * (2 ^ $$2))
© mIRC Discussion Forums