home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!gatech!destroyer!ncar!ncar.ucar.edu!hpoppe
- From: hpoppe@ncar.ucar.edu (Herb Poppe)
- Subject: Re: Using GetNextEvent or WaitNextEvent...
- Message-ID: <1992Jul21.202141.3329@ncar.ucar.edu>
- Sender: news@ncar.ucar.edu (USENET Maintenance)
- Organization: National Center for Atmospheric Research
- References: <16JUL199216005351@gergo.tamu.edu>
- Date: Tue, 21 Jul 1992 20:21:41 GMT
- Lines: 21
-
- In article <16JUL199216005351@gergo.tamu.edu> dave@gergo.tamu.edu (Dave
- Martin) writes:
-
- > What's the best way to implement a main loop which can get it's events
- > either from WaitNextEvent or GetNextEvent (if WNE isn't available on
- > that machine)?
-
- > I was thinking along the lines of a boolean (hasWNE) and doing an:
-
- > IF (hasWNE AND WaitNextEvent(...)) OR
- > (NOT(hasWNE) AND GetNextEvent(...)) THEN... (Main Loop)
-
- Note that both WaitNextEvent and GetNextEvent could be called depending on
- how the compiler you use compiles AND and OR. The Pascal standard does not
- require short-circuit evaluation of AND and OR. THINK Pascal (at least,
- don't know about MPW) provides non-standard forms of AND and OR (I forget
- the syntax) that always result in short-circuit evaluation.
-
- Herb Poppe National Center for Atmospheric Research (NCAR)
- hpoppe@ncar.ucar.edu 1850 Table Mesa Dr.
- (303) 497-1296 Boulder, CO 80303
-