an ugly solution to a newbie problem!
[1/3] from: caw::cs::mu::oz::au at: 22-May-2001 4:47
I had previously asked how to do this:
>server: "machine-1" >listen-port: open/lines tcp://:server:8000 >This (obviously) doesn't work...what I want to get is >listen-port: open/lines tcp://machine-1:8000 >How to you get the value of a word "in-the-middle" of an expression?
Crass experimentation lead to : server: "machine-1" s: join (join "tcp://" :server) ":8000" listen-port: open/lines (do :s) :s has type? string! which wont be accepted in open but (do :s) has type? url! and it works... but the MUST be a more elegant way. I'd be grateful for help! chris
[2/3] from: brett:codeconscious at: 22-May-2001 15:01
Hi Chris, I answered on the other thread you posted but I thought I'd answer this one as well 'cause you don't need the "do". server: "machine-1" listen-port: open/lines join tcp:// [server ":8000"] Regards, Brett.
[3/3] from: g:santilli:tiscalinet:it at: 22-May-2001 14:05
Chris Wright wrote:
> but the MUST be a more elegant way. I'd be grateful for help!
A different way to do the same thing is: server: "machine-1" port: open/lines [ scheme: 'tcp host: server port-id: 8000 ] HTH, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/