Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!elroy.jpl.nasa.gov!ames!ucsd!nosc!crash!pro-sol.cts.com!mdavis From: mdavis@pro-sol.cts.com (Morgan Davis) Newsgroups: comp.sys.mac.programmer Subject: Re: Animation Message-ID: <7494@crash.cts.com> Date: 9 Feb 91 20:39:35 GMT Sender: root@crash.cts.com Lines: 40 In-Reply-To: message from dweisman@umiami.ir.miami.edu } > tmp := TickCount; } > while tmp=Tickcount do { nothing } ; } > } > CopyBits(.....) } } This is fine except for a minor detail. As it says in IM Vol. I... } } [quote removed] } } So instead say: } } tmp:=TickCount; } repeat until TickCount>=(tmp+1); } } CopyBits..... } } ==Dan Your method, derived from what you understood about TickCount from Inside Mac, is almost as safe as the first one, but certainly not any better. While the first example would loop until Ticks changed, your example would loop until Ticks increased by some amount. In reality, they're identical in function, only your method would not work if Ticks had somehow managed to decrease in value. In either case, I think it is important to realize that both methods are equally acceptable for this situation. Where I think you misinterpreted Inside Mac is when you have a scenario such as this: tmp := TickCount; repeat until TickCount = (tmp + N); The problem here is that you're waiting for TickCount to equal a certain constant value *OTHER THAN ITS OLD VALUE*. This isn't safe. It is important to understand the difference. UUCP: crash!pro-sol!mdavis AOL, BIX: mdavis ARPA: crash!pro-sol!mdavis@nosc.mil GEnie: m.davis42 INET: mdavis@pro-sol.cts.com ProLine: mdavis@pro-sol