The #$ident syntax is clear for built-in identifiers, if it's a $N identifier, evaluate and keep the '#' only if $N has a value, if it's any other built-in identifier, evaluate but always remove the '#'.
Now for custom identifiers, mIRC doesn't try to evaluate the identifier itself but using the '#':
//alias $chr(35) $+ $!msl return 1 | echo -a new identifieur: #$msl | alias $chr(35) $+ $!msl
This create an alias named '#$msl' returning 1; we use the #$msl syntax, and here it goes, mIRC prefixes the whole thing with a '$' and evaluate it, ie: $#$msl
The help file doesn't state anything, as usual, but I guess it should behave the same as with built-in identifier different than $N, ie: evaluate the identifier and always remove the '#'.