Hello All

Here is the code:

   cPrinter := 'Kyocera FS-1000 (KPDL-2)'

   SET PRINT ON
   SET CONSOLE OFF
   SET PRINTER TO ( cPrinter )

   ? 'Ok, I am printing'
   eject

   SET PRINTER TO
   SET PRINT OFF
   SET CONSOLE ON

The code above correctly prints on the specified printer in xHarbour
but fails in Harbour. In Harbour it creates a disk file  with .prn suffix:
Kyocera FS-1000 (KPDL-2).prn

xharbour/source/rtl/set.c :

      case HB_SET_PRINTER    :
         hb_retl( hb_set.HB_SET_PRINTER );
         if( args > 1 )
         {
            hb_set.HB_SET_PRINTER = set_logical( pArg2,
hb_set.HB_SET_PRINTER );

            if( hb_set.HB_SET_PRINTER )
            {
               hb_set_SetPrinterStart();
            }
            else
            {
               hb_set_SetPrinterStop();
            }
         }
         break;

harbour/source/vm/set.c :

      case HB_SET_PRINTER:
         hb_retl( pSet->HB_SET_PRINTER );
         if( args > 1 )
            pSet->HB_SET_PRINTER = set_logical( pArg2, pSet->HB_SET_PRINTER
);
         break;

Which compiles has the correct behavior?

Regards
Pritpal Bedi

-- 
View this message in context: 
http://www.nabble.com/SET-PRINTER-TO-%28-cPrinter-%29---Bug-tp20431996p20431996.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to