Hi, Wednesday, August 27, 2003, 9:48:38 PM, you wrote: JB> [snip] JB> toggle_light(1); JB> sleep(120); JB> toggle_light(1);
JB> toggle_light(2); JB> move('self', 'room/'); JB> if ($lightbulb['temp'] > $room['temp']) { JB> echo "switch #1"; JB> } elseif ($lightbulb['ison']) { JB> echo "switch #2"; JB> } else { JB> echo "switch #3"; JB> } JB> hm.. i had to keep it OT somehow :) JB> [/snip] JB> :7) Curt. JB> However, Curt does bring up a good point....given a real world situation JB> create the decision logic (in code format) that demonstrates you grep JB> the path needed to arrive at a conclusion. As many of us model business JB> processes this is a valid method for determining familiarity with the JB> problem solving method in a code based world. JB> Some of you requested another situation.... JB> You are presented with three crates. One is labled 'apples', one is JB> labled 'oranges', one is labled 'apples and oranges'. The lables have JB> been mis-applied with none of the lables being on the correct crate. To JB> be perfectly clear ( :7) Brian! ) one crate contains apples, one JB> contains oranges, and one contains apples and oranges...but you do not JB> know which crate contains which fruits. Can you draw one fruit from a JB> single crate (without being able to see inside the crate) and determine JB> where the labels should be re-applied in order to correct the problem? JB> -- JB> PHP General Mailing List (http://www.php.net/) JB> To unsubscribe, visit: http://www.php.net/unsub.php take fruit from apples/oranges if(apple) move apple_label to current move orange_label to old apple move apples/oranges_label to old orange else move orange_label to current move apple_label to old_orange move apples/oranges_label to old apple endif -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php