1. I/O Redirection -Reply

>Tim,

> Try this :-
>
>   puts(1,"Standard Output \n")
>   puts(2,"Standard Error  \n")
>
>The error channel always prints to screen even if Standard Output is
>re-directed, it is a lot easier than poking the video memory.
>
>Regards - Peter

Thanks I will give that a try. Coming from a UNIX background, I
forgot that in DOS you can't redirect standard error. You can in
UNIX.

But I'm still wondering why opening CON doesn't work. Is it because
an open call inside of program sets up buffered I/O ?

I'm assuming that because the calls which set up the graphics mode
and position the cursor on the screen are indeed dealing with the
screen directly, so that a print to 2, would end up the same place on
the screen as a print to 1.

-tim

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu