Hello world/Line printer: Difference between revisions

Add language: NROFF. Also, I was born in 2000, so I don't actually know what a line printer is, but I remember somewhere how to typeset documents for the line printers.
(→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details)
(Add language: NROFF. Also, I was born in 2000, so I don't actually know what a line printer is, but I remember somewhere how to typeset documents for the line printers.)
Line 565:
fprintf(fid,'Hello World!\n');
fclose(fid);</lang>
 
=={{header|N/t/roff}}==
 
/.ROFF/, being a document formatting language, is especially suited for formatting documents and sending them to printers of nearly all types.
To send the output to the line printer, you must compile the source file with the following command on the shell, assuming the source file is <code>file.roff</code> and that the line printer is already setup properly.
 
<code>
nroff -Tlpr file.roff
</code>
 
In this case, you must use NROFF, not TROFF, to compile the source file. As NROFF is better-suited for monospaced, typewriter-style line formatting.
 
Because /.ROFF/ is a document formatting language, the majority of lines in a typical /.ROFF/ source file is to be textual input. This input is typeset directly onto the output medium. Therefore, the user need not call a procedure to print text to any terminal.
 
<lang N/t/roff>
Hello World!
</lang>
 
=={{header|Nim}}==
Anonymous user