Skip to main content
Skip table of contents

(v13) Overview of shadowop

This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.

shadowop is an operator in internaldict which manages a dictionary whose keys are names to be ‘shadowed’ and whose values are procedures. Its behavior depends on whether a dictionary entry is an operator name or a procedure name:

  • When a true operator is encountered whose name is in this dictionary, the interpreter diverts execution to the corresponding procedure, and while inside that procedure turns shadowing off, so that the real operators are available to the shadow procedure. This allows the function of an operator to be changed, while it still looks like the original operator to the calling program (it retains the type of an operator, rather than a procedure).
  • When the def operator’s first operand (or the key operand to the put operator) matches a name other than an operator name in the shadow dictionary, the second operand is replaced by the corresponding shadow procedure. This allows for interception of application-defined procedures.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.