class Rational begin instance int num, den; Rational init( int num, den; ) begin this.num = num; this.den = den; return this; end end void printRat( Rational r; ) begin Rational s = r; println( s.num + "/" + s.den ); end real ratToReal( Rational r; ) begin return ( r.num + 0.0 ) / r.den; end Rational r; r = new Rational.init( 3, 2 ); println( r.num + "/" + r.den ); printRat( r ); println( ratToReal( r ) );