Re: assert-like debug { /* code */ } feature?



On Sep 5, 4:26 am, Eric Sosman <esos...@xxxxxxxxxxxxxxxxxxxx> wrote:
        boolean asserting = false;
        assert (asserting = true);  // just one =

Hmm, I was unaware of assignment being interpreted as predicate. Just
checked this weird code:

boolean asserting = false;
if( asserting == (asserting = true) )
asserting = (asserting = true);

Why on earth this is allowed?
.



Relevant Pages

  • Re: Planets and Stars - an idea
    ... |> The notion that the earth's pole faces Polaris because Polaris exerts ... |> wobble the earth has must either be small, or slow, and so can't account ... You have been asserting that the Earth is on a line with the Sun ... aside from the assertions that they cause the earth's spin to slow down (but does not affect the Sun's gravitational pull). ...
    (rec.arts.sf.science)
  • Re: RIH Zarqawi
    ... You die from the concussion as he obviously did. ... earth could you be asserting here? ... That he died of fright? ...
    (rec.audio.pro)
  • Re: Coextensive properties?
    ... out communication the "girlie" charge (cognitive "science" full of ... predicate logic as a universal theoretical framework. ... asserting a system of propositions, just as, in the above ...
    (sci.logic)