Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Printing in REBOL

From: al::bri::xtra::co::nz at: 15-Jan-2001 16:27

[ REBOL [ Name: 'Printer Title: "Printer" File: %"Printer.r" Home: Author: "Andrew Martin" eMail: [Al--Bri--xtra--co--nz] Date: 17/October/2000 Version: 1.0.0 Enhancement: 'Printer Example: [ Printer "This goes to the printer!" Printer/Page "This prints this line and feeds a page!" ] ] Printer: func [ "Sends text to printer on //prn." [catch] Text [string!] "The text to be printed." /Page "Append Carriage Return (CR) and Page Feed." ][ throw-on-error [ secure [ %//prn [allow write] ] write %//prn Text if Page [write/binary %//prn "^(0D)^(page)"] Text ] ] ] Andrew Martin ICQ: 26227169