Method code for $root.eval()

[Turn off line numbering]
  1: arg code, @dest;
  2: var errors, result, method;
  3: 
  4: dest = dest ? dest[1] : this();
  5: if (!(sender() in [$scheduler, $root]))
  6:     (> .perms(sender()) <);
  7: 
  8: // Compile the code.
  9: method = tosym("tmp_eval_" + tostr(time()));
 10: errors = .add_method(code, method);
 11: if (errors)
 12:     return ['errors, errors, 0, 0];
 13: 
 14: // Evaluate the expression.  Be sure to remove it afterwards, so that no
 15: // one else can call it.
 16: catch any {
 17:     result = (> dest.(method)() <);
 18: } with {
 19:     (| del_method(method) |);
 20:     rethrow(error());
 21: }
 22: (| del_method(method) |);
 23: return ['result, result];
 24: 
 25: // $#Edited: 14 Jan 02 22:24 $brandon

["// Created as a part of ColdCore, see: @help Credit"]

the Cold Dark