You can rearrange the order of super procedures in two ways:

  1. If the ADD-SUPER-PROCEDURE() method is executed for a procedure handle already in the stack, the AVM moves it to the head of the list (that is, to the position of being searched first). If the procedure was already first in the stack, no change occurs and no error results. For example, this sequence of statements results in the SUPER-PROCEDURES attribute returning the handle of Super2 followed by the handle of Super1:
    hProc:ADD-SUPER-PROCEDURE(hSuper1).
    hProc:ADD-SUPER-PROCEDURE(hSuper2).
    hProc:ADD-SUPER-PROCEDURE(hSuper2).
    And this sequence results in the SUPER-PROCEDURES attribute returning the handle of Super1 followed by the handle of Super2:
    hProc:ADD-SUPER-PROCEDURE(hSuper1).
    hProc:ADD-SUPER-PROCEDURE(hSuper2).
    hProc:ADD-SUPER-PROCEDURE(hSuper1).
  2. You can also rearrange the order of super procedure handles on the stack by invoking a sequence of REMOVE-SUPER-PROCEDURE() and ADD-SUPER-PROCEDURE() methods. Each REMOVE-SUPER-PROCEDURE() method removes that handle from the list, wherever it is. And each ADD-SUPER-PROCEDURE() method adds the named handle to the head of the list. A handle is never added to the list a second time.