next up previous
Next: Building the worksheet
Up: MM circuit example
Previous: The other objects

Making the connections

object my_circuit
  inherits( awf: amplifier_with_feedback +
            i  : inverter
          )
  i.input = awf.output
}

The = connects together two attributes, making them equal.

It is useful to have an abbreviated declaration, so that if there is only one instance of an object, the programmer can use it without having to think up a unique name:

object my_circuit
  inherits( amplifier_with_feedback +
            inverter
          )
  inverter.input = amplifier_with_feedback.output
}



Jocelyn Ireson-Paine
Sat Nov 28 17:42:14 GMT 1998