On Tue, 2005-09-20 at 00:56 -0500, David Kelly wrote:
I prefer to read the busy flag in bit 7 of register 0 on the LCD
rather than timed loops. Text LCDs are fairly predictable but I'm
more comfortable delaying my next write until the particular LCD says
its ready. Some LCD commands take
There are quite a few errors in this app. note. But at least it does
work when you need it to. I don't bother with the 3.5V regulation, and
run the Atmel at 12Mhz (I use an ATTINY2313 device). I use some series
resistors in the data lines, and my 'pullup' is slightly different to
the app note, but
I was helping a friend debug some code, he is new to C, using the Keil
version of GCC for ARM. Anyway I found the following:
int i;
i=0;
i=i++;
//i was still zero that
That is i=i++ never incremented i, now I would have thought the line would
be the same as:
i=i;
i=i+1;
So you guys are the
On 9/20/05, Trampas [EMAIL PROTECTED] wrote:
I was helping a friend debug some code, he is new to C, using the Keil
version of GCC for ARM. Anyway I found the following:
int i;
i=0;
i=i++;
//i was still zero that
i=i++ is somehow ambigous.
The statement i++ means use the value of i then
Hi,
On 20 Sep 2005 at 6:41, Trampas wrote:
I was helping a friend debug some code, he is new to C, using the Keil
version of GCC for ARM. Anyway I found the following:
int i;
i=0;
i=i++;
//i was still zero that
I think that the right-hand side is completely evaluated before
applying
First off this was code written by a newbie to C and embedded development as
such it would have been better to do i++ or i=i+1. But he did it as i=i++;
The code was actually something like this:
char name[20];
char c;
int i;
i=0;
c=getchar();
while(c!=13)
{
name[i]=c;
c=getchar();
Hi Trampas,
Thats why you have an post-increment operator and pre-increment operator.
i=++i;
will give you the result, you'd expected.
i++, will execute the assignment and after that the value gets inc'd
++i, will inc'd and then assign
Hopefully I got it right :)
/Marc
Trampas wrote:
I
Trampas wrote:
I was helping a friend debug some code, he is new to C, using the Keil
version of GCC for ARM. Anyway I found the following:
int i;
i=0;
i=i++;
//i was still zero that
That is i=i++ never incremented i, now I would have thought the line would
be the same as:
i=i;
i=i+1;
Please pose C questions to a relevant medium, e.g. the programming questions
list of the ACCU ( WWW.ACCU.org ) or one of the C newsgroups ( e.g.
news:comp.lang.c
or the C learners' newsgroup).
On Tue, 20 Sep 2005 13:47:49 +0200, David Brown emailed:
I'd agree with you that i should be 1 after
ya variable i should have increamentd to 1 ...
but i guess u r not using incremented value of i in your program,
so compiler thinks that it is of no use and doesn't do anything with the
variable...you shoud try defining i variable ...then it will not optimise
the code...
and will show you the
Здравствуйте, Trampas.
Вы писали 20 сентября 2005 г., 14:41:22:
I was helping a friend debug some code, he is new to C, using the Keil
version of GCC for ARM. Anyway I found the following:
int i;
i=0;
i=i++;
//i was still zero that
That is i=i++ never incremented i, now I would have
From: David Brown [EMAIL PROTECTED]
- Original Message -
From: Trampas [EMAIL PROTECTED]
I was helping a friend debug some code, he is new to C, using the Keil
version of GCC for ARM. Anyway I found the following:
int i;
i=0;
i=i++;
//i was still zero that
[...]
I'd agree with
Hi,
In C the result of this expression is undefined. The C language defines
that the compiler is allowed to increment the variable i before or after
the assignment operation.
h=i++ is valid C, h will have the old value of i, i will be incremented.
i=i++ is invalid C, the value of the variable
On 20 Sep 2005 at 9:59, Mike Murphree wrote:
Alexandru Csete said:
[...]
int i = 3;
i = i++;
gave the values 3, 4 and 7 - each of them equally correct ;-)
If writing software for a safety critical system which I occasionally do,
I expect my compiler not to do Bad Things(TM) and it
Hi all,
I recently reinstalled my linux box and have now lost the avr toolset i used
to use.
I now have to build the toolset again and would like to know what are the
latest available that i can use.
One of the important things i need are the coff patch by Joerg Wunsch as i
use VMLab for
Kitts schrieb:
Hi all,
I recently reinstalled my linux box and have now lost the avr toolset i used
to use.
I now have to build the toolset again and would like to know what are the
latest available that i can use.
One of the important things i need are the coff patch by Joerg Wunsch as
On Sep 20, 2005, at 2:12 PM, Jeff Barlow wrote:
Internet email is gradually degrading due to lame software and
clueless users.
Yes, that is exactly why I wrote. To alert the clueless. Apparently
the clueless cherish their cluelessness, but that was nothing new.
Yes, the messages are
On Tuesday 20 Sep 2005 10:39 pm IST, Anton Erasmus wrote:
AE One of the important things i need are the coff patch by Joerg Wunsch
AE as i use VMLab for debugging.
AE
AE Previously i used the files provided by Rod at
AE http://home.telkomsa.net/antera/
AE
AE This is still the equivalent
18 matches
Mail list logo