= #JxnPortable/docs/programmer_examples/demos/Overwrites_Demo.jxn

d1 = 1.
 = 1.0 (double)
d2 = 2.
 = 2.0 (double)
b1 = (1).byteValue()
 = 1 (byte)
b2 = (2).byteValue()
 = 2 (byte)
d2 = b1  ! overwrites primitive without warning
 = 1 (byte)
b2 = d1  ! overwrites primitive without warning
 = 1.0 (double)
d2 = j  ! warning on overwrite primitive with object
? statement: overwrites 1 (byte), old value in $$
 = 0.0 + j 1.0 = 1.0 <) 90.0° (JxnComplexAlgebra)
!
child1 = @KmgComplex( 0, 1 )  ! class KmgComplex extends JxnComplexAlgebra
 = 0.0 + j 1.0 = 1.0 <) 90.0° (KmgComplex)
child2 = @KmgComplex( 0 ,2 )
 = 0.0 + j 2.0 = 2.0 <) 90.0° (KmgComplex)
parent1 = j
 = 0.0 + j 1.0 = 1.0 <) 90.0° (JxnComplexAlgebra)
parent2 = 2j
 = 0.0 + j 2.0 = 2.0 <) 90.0° (JxnComplexAlgebra)
!
JxnComplexAlgebra.class.isInstance child1
 = true (boolean)
parent2 = child1  ! overwrites superclass without warning
 = 0.0 + j 1.0 = 1.0 <) 90.0° (KmgComplex)
!
KmgComplex.class.isInstance parent1
 = false (boolean)
child2 = parent1  ! warning on overwrite class with superclass
? statement: overwrites 0.0 + j 2.0 = 2.0 <) 90.0° (KmgComplex), old value in $$
 = 0.0 + j 1.0 = 1.0 <) 90.0° (JxnComplexAlgebra)
child2 = d1  ! warning on overwrite object with primitive
? statement: overwrites 0.0 + j 1.0 = 1.0 <) 90.0° (JxnComplexAlgebra), old value in $$
 = 1.0 (double)