Tim wrote:
> Does rebol have a standard output handle like c?
> Example : In "C" I can write something like this:
> file://=======================================================
> FILE* f;
> IF write_to_file THEN
>   f = fopen("test.htm","w")
> ELSE
>   f = stdout;
> ENDIF
> fprintf(f,"This could be written to the console\n"
>           "OR to the console OR as web content");

Redefining 'print would be the simplest way. Something like this:

either write_to_file [
    print: function [value] [
        write/append %test.htm value
        ]
    ] [
    print: get in system/words 'print
    ]

Andrew Martin
REBOL/View Beta expired! :-(
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-

Reply via email to