porting my code from Pascal to Java
Work around calc.java