! this routine tests the prtfunct language calls
b = true 

! initialize the printer to set the print device name global 
PRINTER IS ""
   
  pname       = call ("PRTNAME");
  total_lines = call ("TOTALLN");
  cur_line    = call ("LINENO");
  line_width  = call ("LINELEN");
  ptype       = call ("PRTTYPE");
  
  put at 1,3 "printer name = ", pname, do newline 
  put "total lines = ", total_lines, do newline 
  put "current line = ", cur_line, do newline 
  put "line width = ", line_width, do newline
  put "printer type = ", ptype 
  if ptype = 1 
     put tab 3, "PRINTER", do newline
  else if ptype = 2
     put tab 3, "FILE", do newline
  else if ptype = 3 
     put tab 3, "SCREEN", do newline
  end if 
  get b  
  
PRINTER END 

