Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!philmtl!atha!aunro!alberta!ubc-cs!van-bc!rsoft!mindlink!a1406 From: a1406@mindlink.UUCP (Elise Tarrant) Newsgroups: comp.sys.amiga.tech Subject: Re: Wait()ing Peacefully Message-ID: <1322@mindlink.UUCP> Date: 16 Mar 90 03:08:58 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 23 > bdiscoe writes: > > Msg-ID: <1990Mar16.214401.1738@spectre.ccsf.caltech.edu> > Posted: 16 Mar 90 21:44:01 GMT > > Org. : California Institute of Technology > Person: Ben W. Discoe > > How do you Wait() on several ports simultaneously? I know how to wait on, > say, the serial device, console device and an IDCMP individually, but what > I really need to do is wait on a message from any one of them. > > I tried: waitflags = | |.... ; > Wait(waitflags); > but this didn't seem to work. > > -Ben "But I READ the manual! Honest!" You almost had it. Instead of trying to or the bits into one flag to wait for, set up two flags and then or in the call to wait(), like this. wait1flag = ; wait2flag = ; wait(wait1flag | wait2flag);