GlobalReleaseHook

GlobalReleaseHook -- a method name which is consulted when an assignment to a global variable is about to occur.

The method should be a function of two variables: the symbol to which a value is being assigned, and the old value about to be overwritten. The method should be stored under the name GlobalReleaseHook in the class of the old value. It is executed before the assignment occurs, and before the execution of GlobalAssignHook.

i1 : GlobalReleaseHook RR := (sym,val) -> << concatenate (
          "assigning ", name val, " to ", name sym
          ) << endl

o1 = --function--

o1 : Function
i2 : a=4.5

o2 = 4.5

o2 : RR
i3 : a=5.4
assigning 4.5 to a

o3 = 5.4

o3 : RR

See also GlobalAssignHook.


topindexpreviousupnext