Re: How printf() works???????
- From: Richard <devr_@xxxxxxxxx>
- Date: Fri, 07 Mar 2008 15:25:38 +0100
santosh <santosh.k83@xxxxxxxxx> writes:
Richard wrote:
santosh <santosh.k83@xxxxxxxxx> writes:
Robbie Hatley wrote:
"Richard" <devr_@xxxxxxxxx> wrote:
Richard Heathfield <rjh@xxxxxxxxxxxxxxx> writes:
<snip>
x < 30 is a relational expression, and all expressions have
values. Relational expressions have the value 0 if they're false,
and 1 if they're true. So x < 30 will evaluate to 0 if x is less
than 30, and 1 otherwise.
It won't actually.
How do you figure? It does in standard C. If it doesn't for you,
then your compiler is broken and you should get a better one.
The expression x < 30 will evaluate to 1 if x is less than 30 and
zero otherwise. Richard said the reverse, by mistake I'm sure.
Getting something totally backwards is,of course, a mistake. There is
no evil intent in my correction. Why you feel the need to confirm his
"mistake" is very strange.
Because he did not spot RJH's error and therefore, could not understand
your correction.
So therefore, maybe he should post nothing? Did that cross your mind? he
waffled on about my broken compiler and its as clear as day he never
tried the code with his wonderful,all singing, all dancing compiler.
Possibly you should inform Robbie to be
less quick to tell people their compilers are broken and that they
should get a new one?
He misread RJH's erroneous sentence. Why blame him for it?
You've gone to the dark side Santosh. I "blame" him for nothing. I am
merely pointing out that one should know what one is talking about before
slamming other posters and insulting their compiler ..... In this case
he didn't bother to, or was unable to, verify my statement. Regardless
of that he started on about standard C and my compiler being broken. I
didn't even need to compile anything to see the obvious mistake that
Heathfield made. See other post for reasons not to harp on about what
that mistake was - it was abundantly clear to any C programmer. Yes it
was a "mistake" but one worth pointing out as RH had gone to great
lengths to explain the boolean nature of the expression only to get it
180% wrong : a slip of course. I don't honestly believe that RH thinks
that 1<30 returns 0 for example. hence there was no malevolence, no
crowing in my reply. Merely "incorrect" or there abouts. Your need to
jump to RHs defence surprises me. There is no need.
.
- Follow-Ups:
- Re: How printf() works???????
- From: lawrence . jones
- Re: How printf() works???????
- From: Antoninus Twink
- Re: How printf() works???????
- From: santosh
- Re: How printf() works???????
- References:
- How printf() works???????
- From: sant . tarun
- Re: How printf() works???????
- From: Richard Heathfield
- Re: How printf() works???????
- From: Richard
- Re: How printf() works???????
- From: Robbie Hatley
- Re: How printf() works???????
- From: santosh
- Re: How printf() works???????
- From: Richard
- Re: How printf() works???????
- From: santosh
- How printf() works???????
- Prev by Date: Re: Variable length arrays
- Next by Date: Re: How printf() works???????
- Previous by thread: Re: How printf() works???????
- Next by thread: Re: How printf() works???????
- Index(es):
Relevant Pages
|