Re: problem with while loop
Re: problem with while loop
Subject : Re: problem with while loop
From: "J. Aaron Pendergrass" <email@hidden >
Date: Sat, 28 Sep 2002 15:55:03 -0400
Ahh the joys of DeMorgans Law.
!(A || B) <=> (!A) && (!B)
aaron
On Saturday, September 28, 2002, at 12:40 AM, Nathan Day wrote:
That should be
while ( ([today dayOfWeek] != 2) && ([today dayOfWeek] != 4) )
dayOfWeek can't be both 2 and 4 and so it will always be true that
dayOfWeek is != 2 or != 4
On Saturday, September 28, 2002, at 07:05 AM, Jan Van Tol wrote:
while ( ([today dayOfWeek] != 2) || ([today dayOfWeek] != 4) )
{
// increment here ...
}
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
studentdev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/studentdev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
studentdev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/studentdev
Do not post admin requests to the list. They will be ignored.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.