Level 4, lesson 7

# 4.7 Using a printer

Why is this very basic feature an advanced topic? Because it depends on the operating system you're working on. If you're working with MS- DOS it is quite basic:

         " lpt1" pad copy
         output open
         if
               output file
               ." This will be printed."
               output tty
         then

Just open the port as a file and print to it. Under Unix it might be a bit more complex. You might have to define a special token "POPEN" which will open a pipe to "lp", using the library function popen(). Refer to "develop.doc" for more information on how to extend the 4tH language.