Re: How printf() works???????



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.

.



Relevant Pages

  • Re: How printf() works???????
    ... Getting something totally backwards is,of course, a mistake. ... is no evil intent in my correction. ... What he said to you about your compiler is beside the point and did not ... Therefore Robbie Hatley took your statement as correcting a ...
    (comp.lang.c)
  • Re: #define and (brackets)
    ... If I make a mistake, ... if the compiler knows enough to tell me ... due to some implicit type conversion say, then I define that conversion as ... That's automatic bug detection at compile time. ...
    (microsoft.public.vc.language)
  • Re: How printf() works???????
    ... Getting something totally backwards is,of course, a mistake. ... is no evil intent in my correction. ... What he said to you about your compiler is beside the point and did ... "Hey Robbie, you are an idiot to have said that my compiler is not good ...
    (comp.lang.c)
  • Re: How printf() works???????
    ... Getting something totally backwards is,of course, a mistake. ... What he said to you about your compiler is beside the point ... RHs whole reply was based on explaining the OPs code. ... fuss over *my* reply instead of answering directly to Robbie Hatley, ...
    (comp.lang.c)
  • Re: Two Click disassembly/reassembly
    ... bigger mistake if I deliberately implied such a thing. ... computer, invented a language, and wrote a compiler. ... Some portions used pre-existing tools. ... write the tool and port the code, than it would take me to port the code ...
    (alt.lang.asm)