Serial communication
Camm29
Camm29 at tesco.net
Sat Jan 14 14:26:28 EST 2006
David ,
That's just what i needed , i just had mental blockage you made it look so
easy.
Kind Regards
Camm
----- Original Message -----
From: "David Vaughan" <dvk at dvkconsult.com.au>
To: <use-revolution at lists.runrev.com>
Sent: Friday, January 13, 2006 3:48 AM
Subject: Re: Serial communication
>
> On 13/01/2006, at 9:37, Camm29" <Camm29 at tesco.net> wrote:
> >
> > David thanks , that's seems to do the trick.
> > Any ideas how to break out of repeat loops in say 10 seconds as a
> > timeout ?
>
> Glad it worked for you.
>
> I take it you want a loop to execute but stop after an amount of time
> apart from any other condition.
> Leaving aside mechanisms which will simply kill the handler, you
> will probably need to check the time before the loop, add ten seconds
> to it and then inside the loop check the current time to see if you
> have reached that the nominated expiry time yet.
> e.g.
> put the seconds + 10 into expiry
> put false into timedOut
> repeat <on some other condition>
> <do something useful>
> if the seconds > expiry then
> put true into timedOut
> exit repeat
> end if
> end repeat
> -- Now checking timedOut will tell you under what condition you did
> exited, normally or by time.
>
> Does anyone have a more elegant solution for this?
>
> regards
> David
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list