Hello world/Line printer: Difference between revisions

no edit summary
No edit summary
Line 336:
echo 'Hello World!' >/dev/lpt0
echo 'Hello World!' >/dev/ulpt0</lang>
 
=={{header|XPL0}}==
<lang XPL0>code Text=12;
Text(2, "Hello World!
");</lang>
 
The 2 directs the output to the printer (LPT1). Output is usually
directed to the console using device code 0 instead.
 
A carriage return and line feed are normally required to make a line
printer actually print. (A laser or inkjet printer may require a form
feed.) However, some printers, or printer drivers, have a timeout feature
that print even without the CR+LF (or FF). The CR+LF can simply be
included in the string as shown. Another method is to include the CR+LF
control characters as ^M^J.
 
{{omit from|PARI/GP}}
772

edits