Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-31 Thread David VanHorn
Problem solved.. The LCD.C and LCD.H files I've been using are NOT part of the WinAVR distribution! This is my work PC, used by others, and someone switched out the fine coffee normally served in this restaurant with Folger's Crystals.. Let's watch. :-P Sorry for the confusion.. I got

RE: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread Dave Hansen
From: david.br...@hesbynett.no [...char vs. signed cahr vs. unsigned char...] Don't look it up - if you learn the compiler's default behaviour, you risk writing incorrect code. If it is in any way relevant whether a char is signed or not, write signed char or unsigned char explicitly

Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread Joerg Wunsch
Dave Hansen i...@hotmail.com wrote: In this code=2C the handle_input function falls into an infinite loop if pl= ain char is signed. This is because key gets promoted (to signed int) befo= re the comparison with EXIT_KEY (which is already signed int). If plain c= har is signed=2C and key

Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread David VanHorn
I am still very puzzled over why the compiler balks wether I use signed or unsigned chars to feed lcd_puts. When I used unsigned char it balked. When I used char, it didn't. Now when I use int8_t or uint8_t, it balks. ___ AVR-GCC-list mailing list

RE: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread Larry Barello
-list-bounces+larry=barello@nongnu.org] On Behalf Of David VanHorn Sent: Monday, March 30, 2009 10:15 AM To: avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts I am still very puzzled over why the compiler balks wether I use signed or unsigned

Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread David VanHorn
I know what *I* am missing - the source code! How is anyone supposed to help you with your problem until you post the actual compilable code snippet? We need a compilable code sample which demonstrates the problem, along with the compiler flags you used and also the compiler version you

RE: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread Dave Hansen
From: j...@uriah.heep.sax.de Dave Hansen i...@hotmail.com wrote: In this code=2C the handle_input function falls into an infinite loop if pl= ain char is signed. This is because key gets promoted (to signed int) befo= re the comparison with EXIT_KEY (which is already signed int). If

RE: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread Dave Hansen
From: i...@hotmail.com That would work. Another way is to have get_key return int. Oops. I mean, of course, make key an int. Having get_key return an int that is then stored into a char would accomplish... nothing. Regards, -=Dave Express your personality in color!

Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread David VanHorn
Correction: The routine in question is lcd_putc not lcd_puts. ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread Bob Paddock
On Mon, Mar 30, 2009 at 2:48 PM, David VanHorn d...@mobilefusioninc.com wrote: I thought I must be doing something fairly trivial wrong, this IS only my second project in C... Dave, I have two recommendations for a beginner at C. 1) Buy yourself a copy of Gimpel Lint, even if you have to pay

Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-30 Thread Steven Michalske
I learned to code C/C++ with the dummies book, it gave pretty clear examples. C doesn't have to be hard, just take the time to grock it and not rush it. Also, this is a great read for understanding social dynamics on how to ask people questions and get an answer.

Re: [avr-gcc-list] Re: Passing a string variable to lcd_puts

2009-03-28 Thread Joerg Wunsch
David Brown david.br...@hesbynett.no wrote: That's true in C, but C++ considers all three as separate types (C++ is a little bit fussier about mixing types). C99 does as well, but it doesn't enforce it in a strict way. An application making assumptions about the signedness of the type char is