Hello
Thanks Dale and Rex for your reply, why I asked the qestion is that the
other For loops in the program never use the control condition, so thought
there maybe some special meaning.
Best regards,
======= At 2006-05-16, 18:55:16 you wrote: =======
>Dale DuRose wrote:
>> #include <stdio.h>
>> int main(){
>> int i;
>> for(i = 4; i; i--){
>> printf("%d\n", i);
>> }
>> }
>>
>> output is:
>> 4
>> 3
>> 2
>> 1
>>
>> So thats four loops the statement is false when i is 0.
>
>C doesn't have a boolean type. Have a look in a header file and you'll see
>#define TRUE 1
>#define FALSE 0
>
>In reality, 0 is false, non-zero is true.
>
>You'll see this all over the place, like
>
>if( !strchr( haystack, needle ) )
>...
>
>Cheers, Rex
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.392 / Virus Database: 268.5.6/340 - Release Date: 15/05/2006
>
>.
= = = = = = = = = = = = = = = = = = = =
Paul Parkyn
[EMAIL PROTECTED]
2006-05-16