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

[REBOL] Re: Binary reading from stdin

From: g:santilli:tiscalinet:it at: 18-Feb-2002 12:44

At 22.07 17/02/02, you wrote:
>I'm trying to write a program that reads binary data from fd 0 >(stdin). Is there any way to accomplish that with REBOL?
stdin is system/ports/input. You'll have to do something like: set-modes system/ports/input [binary: yes] data: copy system/ports/input You'll need to set it back to string if you need to get input from the user later (but it's likely you don't, if you're piping data from another process). Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r