in reply to Re: Re: Re: Multi-Threaded Elevator Simulator
in thread Multi-Threaded Elevator Simulator
If I was your teacher, I'd rap you on the knuckles with a ruler for writing that! Gah!$max_wait = ($wait1 > $wait2) ? ($wait1 > $max_wait) ? $wait1 : $max +_wait : ($wait2 > $max_wait) ? $wait2 : $max_wait;
Please, consider this much clearer alternative:
Or, if you don't like the "and" there...$max_wait < $_ and $max_wait = $_ for $wait1, $wait2;
for ($wait1, $wait2) { $max_wait = $_ if $max_wait < $_; }
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Re: Re: Re: Multi-Threaded Elevator Simulator
by BrentDax (Hermit) on Aug 09, 2002 at 22:29 UTC |