This is second version of $glue snippet, [ string $+ &bvars ]
//bset -t &world 1 world | echo -a $bvar($ircdnumeric(hello,$chr(32),&world),1-)
returns: 104 101 108 108 111 32 32 32 119 111 114 108 100
104 101 108 108 111 - string 'hello'
32 - separator
32 - $chr(32)
32 - separator
119 111 114 108 100 - binary variable '&world'
I use this for my IRCd on mIRC :)
Screenshot: http://img832.imageshack.us/img832/3333/ircdnumeric.png
alias ircdnumeric {
var %i = 1
while (%i <= $0) {
var %0 = $replace($ [ $+ [ %i ] ],$chr(32),$lf), %i = %i + 1
if (&?* iswm %0) {
bcopy -c &numeric $calc($bvar(&numeric,0) + 1) %0 1 -1
}
elseif (%0) {
bset -t &numeric $calc($bvar(&numeric,0) + 1) $v1
}
if ($ [ $+ [ %i ] ]) {
bset &numeric $calc($bvar(&numeric,0) + 1) 32
}
}
breplace &numeric 10 32
return &numeric
}