Elementary Items Passed by Content or by Value

If the formal parameter is an object reference described with the ACTIVE-CLASS phrase, one of the following conditions must be true:

  1. The method to be activated must be invoked with the predefined object references SELF or SUPER, or with an object reference described with the ACTIVE-CLASS phrase, and a SET statement must be valid in the activating unit with the argument as the sending operand and an object reference described with the ACTIVE-CLASS phrase as the receiving operand, where the presence or absence of the FACTORY phrase is the same as in the formal parameter.
  2. The method to be activated must be invoked with a class-name or with an object reference described with a class-name and the ONLY phrase, and a SET statement must be valid in the activating unit with the argument as the sending operand and an object reference described with that class-name and the ONLY phrase as the receiving operand, where the presence or absence of the FACTORY phrase is the same as in the formal parameter.

If the formal parameter is of class pointer or an object reference descrited without the ACTIVE-CLASS phrase, the conformance rules are the same as if a SET statement were performed in the activating runtime element with the argument as the sending operand and the corresponding formal parameter as the receiving operand.

If the formal parameter is not of class object or pointer, the conformance rules are the following:

  1. If the activated element is a program for which there is no program-specifier in the Repository paragraph of the activating element and there is no NESTED phrase specified on the CALL statement, the formal parameter must be described with the same number of character positions as the corresponding argument.
  2. If the activated unit is one of the following:
    • A program for which there is a program-specifier in the Repository paragraph of the activating element
    • A program that was called with a CALL statement in which the NESTED phrase is specified
    • A method
    • A function

    then the conformance rules depend on the type of the formal parameter as specified in the following rules:

    1. If the formal parameter is numeric, the conformance rules are the same as for a COMPUTE statement with the argument as the sending operand and the corresponding formal parameter as the receiving operand.
    2. If the formal parameter is an index or pointer data item, the conformance rules are the same as for a SET statement with the argument as the sending operand and the corresponding formal parameter as the receiving operand.
    3. If the formal parameter is described with the ANY LENGTH clause, its length is considered to match the length of the corresponding argument.
    4. Otherwise, the conformance rules are the same as for a MOVE statement with the argument as the sending operand and the corresponding formal parameter as the receiving operand.