Re: Standard Output...

new topic     » goto parent     » topic index » view thread      » older message » newer message

There are 2 ways to do this. The first easy (and hacked) method
uses system(). The second (more compicated) method uses C calls to
do screen io directly and bypass ncurses.

For the first method, you can just copy this procedure:

procedure echo_puts(sequence s)
system("echo -e "&s, 2)
free_console()
end procedure

This will use the command echo to show data on the screen
(free_console(),
which is in dll.e, is needed to avoid the "Press Enter ..." prompt
which comes up at the end of any Linux Euphoria program).

For the second method, you can use C calls to glibc directly to
show your information. I have already done this and instead of
explaining
how to do it, I will make an announcement to this list when I have
placed
the library on my download site.

jbrown

On  0, orkim at kc.rr.com wrote:
> 
> Hello Everyone,
> 
> I'm currently using Euphoria on Linux and I'm trying to figure out if
> there is a way I can use stdout instead of the default way Euphoria
> outputs to the screen.  I'm doing a short application that makes several
> system calls (to which I'd like to see the output) and as soon as the
> program finishes I get returned to "Euphoria's Page" that only has
> output that I've put there using puts or printf.  I'm using system_exec
> for execution of outside programs.  A "puts("test",1)" and
> "puts("test",2)" seems to make no difference.
> 
> Thanks in advance,
> 
> Doug Miller
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu