C Struct emulation for mIRC v6.16By: cerberus
Last Modified: Oct 03 1:23am (r1)

just a lil something i found usefull.....

alias sadd {
;-- /sadd <struct> <variable> <value>
var %struct struct. $+ $1
if ($hget(%struct) == $null) hmake %struct
if ($3 != $null) hadd %struct $2 $3-
}
alias sdel {
;-- /sdel <struct> <variable>
var %struct = struct. $+ $1
if (($hget(%struct) != $null) && ($2 != $null)) hdel -w %struct $2
if (($2 == $chr(42)) && (($hget(%struct) != $null))) hfree %struct
}
alias sget {
;-- $sget(<struct>).<variable>
var %struct struct. $+ $1
if (($hget(%struct) != $null) && ($prop != $null)) return $hget(%struct,$prop)
else return $null
}
|

Comments