MODULE Hello; IMPORT InOut; BEGIN InOut.WriteString('Hello world!'); InOut.WriteLn END Hello. ==={{header|TopSpeed Modula-2}}=== {{works with|TopSpeed (JPI) Modula-2 under DOSBox-X}} Modula-2 does not have built-in procedures for I/O. Instead, I/O is done via library modules. The names and contents of these modules vary between implementations of Modula-2. The solution below shows that the console I/O module supplied with TopSpeed Modula-2 has a different name and different procedures from the implementation in the previous solution. MODULE Hello; IMPORT IO; BEGIN IO.WrStr('Hello world!'); IO.WrLn; (* Another way, showing some features of Modula-2 *) IO.WrStr("Hello"); (* either single or double quotes can be used *) IO.WrChar(40C); (* character whose ASCII code is 40 octal *) IO.WrStr('world!'); IO.WrLn(); (* procedure with no arguments: () is optional *) END Hello.