program type rational = struct( num, den : int; ); funct printRat( r : rational; ) void begin println( r.num + "/" + r.den ); end funct ratToReal( r : rational; ) real begin return ( r.num + 0.0 ) / r.den; end funct newRat( num, den : int; ) rational var rat : rational; begin rat = new rational{ num, den }; return rat; end var r : rational; begin r = newRat( 3, 2 ); printRat( r ); println( ratToReal( r ) ); end.