OK, with all your thinking in my mind (I'm not a borg) my original script:
SomeThing: "x10"
PortFile: open/read %file
qty: 0
while [PortFile: find/tail PortFile SomeThing][
qty: qty + 1
]
now look like this:
SomeThing: "x10"
PortFile: open/read %file
Pos: PortFile
qty: 0
while [Pos: find/tail Pos SomeThing][
qty: qty + 1
]
close PortFile
thanks Volker, Tom, Izkata and Gabrielle
Cesar
----- Original Message -----
From: "Gabriele Santilli" <[EMAIL PROTECTED]>
To: "Izkata" <[EMAIL PROTECTED]>
Sent: Friday, July 22, 2005 10:48 AM
Subject: [REBOL] Re: [PORT]
>
> Hi Izkata,
>
> On Thursday, July 21, 2005, 10:45:09 PM, you wrote:
>
> I> The above line changed PortFile to refer to the string
> I> that Find returned.... Not the port anymore
>
> Actually, FIND returns a port.
>
> Anyway, the garbage collector will close ports when collecting
> them, at least in newer releases. And, it will get closed by the
> OS when REBOL quits.
>
> If you want to close it yourself, just use a different word for
> the position returned by FIND.
>
> I.e.:
>
> while [pos: find port string] [
> ...
> ]
> close port
>
> Regards,
> Gabriele.
> --
> Gabriele Santilli <[EMAIL PROTECTED]> --- http://www.rebol.com/
> Colella Chiara software division --- http://www.colellachiara.com/
>
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
>
>
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.