Re: Unobvious coding error in C
Re: Unobvious coding error in C
- Subject: Re: Unobvious coding error in C
- From: Óscar Morales Vivó <email@hidden>
- Date: Tue, 28 Dec 2004 16:32:20 -0500
You know you've done too much C when... it doesn't seem an unobvious
error to you :P
On Dec 28, 2004, at 13:34 , Alberto Ricart wrote:
On Dec 27, 2004, at 6:47 PM, Alex Majora wrote:
Just for fun, here's a code snippet demonstrating a somewhat
unobvious coding error in C that one of our programmers made today
(just goes to show you what 1 week off can do to a mind!):
#include <stdio.h>
int main()
{
int j, k;
. . .
k = 90; // some assignment of k
. . .
// loop 5 times max, or until k >= 100
for (j=0;j<5,k<100;j++,k++) {
The eval should be j < 5 && k < 100, right now there's only one eval,
k < 100.
/a
_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden