1. EXU puts ?

--
In linux it possible to have more than one terminal window

open at once. If you use the PUTS() how do you know which terminal

window is going to receive the output. Is there a way to get the

fn number for a specific terminal window ?

Thanks in advance
Bernie

new topic     » topic index » view message » categorize

2. Re: EXU puts ?

On Wed, 30 Aug 2000, Bernie wrote:
> --
> In linux it possible to have more than one terminal window
>
> open at once. If you use the PUTS() how do you know which terminal
>
> window is going to receive the output. Is there a way to get the
>
> fn number for a specific terminal window ?
>
> Thanks in advance
> Bernie

you could always open a eu file handle to what ever /dev/tty*
you want to use and "puts" everything through that file handle.

<untested example>

atom my_tty

my_tty = open("/dev/tty3", "w" )
puts( my_tty, "Sending to tty3\n" )
close( my_tty )

<end untest>

--
cense
a member of the
ak-software development team
http://ak-software.virtualave.net/

contract work for
Web Velocity IT inc.
http://www.webvelocity.ca/

new topic     » goto parent     » topic index » view message » categorize

3. Re: EXU puts ?

--Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD
Content-Transfer-Encoding: 8bit

On Wed, 30 Aug 2000, you wrote:
> --
> In linux it possible to have more than one terminal window
>
> open at once. If you use the PUTS() how do you know which terminal
>
> window is going to receive the output. Is there a way to get the
>
> fn number for a specific terminal window ?
>
> Thanks in advance
> Bernie

Euphoria is going to use the term from which the program was run. You can
open another tty as a file, but this will only work if you are running as root,
which is a bad bad idea. (Users don't have write permissions to most (all?)
devices.

atom tty
tty = open("/dev/tty3","w")
if tty > 0 then
  puts(tty,"Hello, Joe!\n")
end if

If you have more serious communicating to do between processes, see Pete's
sockets code, or set up a fifo. Two programs can read and write to the fifo.
See attached fifo client/server code.
--
Regards,
Irv

--Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD
  name="fifo-client.exu"

new topic     » goto parent     » topic index » view message » categorize

4. Re: EXU puts ?

--

   Thanks to IRV and CENSE

   Bernie

new topic     » goto parent     » topic index » view message » categorize

5. Re: EXU puts ?

> In linux it possible to have more than one terminal window
>
> open at once. If you use the PUTS() how do you know which terminal
>
> window is going to receive the output. Is there a way to get the
>
> fn number for a specific terminal window ?
>
> Thanks in advance
> Bernie

Well Bernie, In linux there are terminals as tty1 to ttyn (where n= digit as
1,2,3,etc) But you must first declare the socket from /dev/ttyn (n=number)

Try puts(tty2, "Text")

I hope this works because I dont use EU on linux anymore.

Thanks

-Asif

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu