Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?

2005-09-20 Thread Vincent Trouilliez
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

Re: [avr-gcc-list] FYI: FW: appnote avr309

2005-09-20 Thread Brian Sidebotham
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

[avr-gcc-list] OT Generic C question

2005-09-20 Thread Trampas
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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Alexandru Csete
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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Wolfgang Wegner
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

RE: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Trampas
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();

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Marc Wetzel
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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Russell Shaw
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;

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Colin Paul Gloster
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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread varsha
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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Lev Vyskubov
Здравствуйте, 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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Dave Hansen
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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Nils Springob
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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread Wolfgang Wegner
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

[avr-gcc-list] latest avr toolset on linux

2005-09-20 Thread Kitts
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

Re: [avr-gcc-list] latest avr toolset on linux

2005-09-20 Thread Uwe Fechner
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

Re: [avr-gcc-list] OT Generic C question

2005-09-20 Thread David Kelly
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

Re: [avr-gcc-list] latest avr toolset on linux

2005-09-20 Thread Kitts
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