> So
>if (a = a + 1024)
>
> evaluates a + 1024, then assigns the result to a, then tests the result
> (of the new a) for true or false ... (or zero or non zero) so it'll always
> be true...
In the interest of nitpicking: if a has value of 64512 then this evaluates
to 0 ie false. Seeing that '
Gordon Henderson wrote:
> That's not what that statement is doing.
>
> One = is an assignment, 2 == is comparision.
>
> So
>if (a = a + 1024)
>
> evaluates a + 1024, then assigns the result to a, then tests the result
> (of the new a) for true or false ... (or zero or non zero) so it'll al
On Wed, 6 Jan 2010, Sean Cross wrote:
> First off, Sorry for the new thread, my old free email account was
> bouncing your replies, and by chance i saw your replies through the
> archived lists.
> I have since changed e-mail accounts, so there should not be any more of
> a bounce problem. (i hope)
Sent: Monday, January 04, 2010 3:26 AM
To: sdcc-user@lists.sourceforge.net
Subject: Re: [Sdcc-user] 8052 pointer seems to quit.
Putu,
> so, *abs_ptr++ is equal to *(abs_ptr++) not (*abs_ptr)++.
Hit, and sunk! You are so right, and I'm the idi
Putu,
> so, *abs_ptr++ is equal to *(abs_ptr++) not (*abs_ptr)++.
Hit, and sunk! You are so right, and I'm the idiot! :-}
Bodo
--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Veriz
On Mon, Jan 4, 2010 at 12:00 AM, Bodo Wenzel wrote:
>> if( a = a + 1024 ) // strangely this makes the
>> pointer work for 21 bytes
> Well, this is a bad code; do you really mean:
>
> if( ( a = a + 1024 ) != 0)
>
> The other proposal "(a == a + 1024)
> if( a = a + 1024 ) // strangely this makes the
> pointer work for 21 bytes
Well, this is a bad code; do you really mean:
if( ( a = a + 1024 ) != 0)
The other proposal "(a == a + 1024)" will never be true. ;-)
> *abs_ptr++ ; // Mak
On Sun, Jan 3, 2010 at 11:57 AM, mr_cross wrote:
> Is it me or stack problems, or me? :P
>
> when it should be 0x00 from 0x2500 - 0x3FFF
>
> if i lose the "if( a = a + 1024 )" test, it runs like it should.
>
hi,
don't you mean that the code should be "if (a == a + 1024)" instead of
above code?
ea