[Turn on line numbering]
arg code, @dest;
var errors, result, method;
dest = dest ? dest[1] : this();
if (!(sender() in [$scheduler, $root]))
(> .perms(sender()) <);
// Compile the code.
method = tosym("tmp_eval_" + tostr(time()));
errors = .add_method(code, method);
if (errors)
return ['errors, errors, 0, 0];
// Evaluate the expression. Be sure to remove it afterwards, so that no
// one else can call it.
catch any {
result = (> dest.(method)() <);
} with {
(| del_method(method) |);
rethrow(error());
}
(| del_method(method) |);
return ['result, result];
// $#Edited: 14 Jan 02 22:24 $brandon
["// Created as a part of ColdCore, see: @help Credit"]