Added code generation for writeln statements.