A problem in C code>>>in Codevision

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello..,
I have declared an array key0[3]={'1','A','B'}
and I want to put only one element of this array on my lcd every time that a==0x00,
so, I wrote:

if(a==oxoo) {
lcd_puts(key0[n]);
n=n+1;
};

But, Codevision program could not understand the second line of the above code...
Can you tell me the reason ..?
Thanks in advance... :!:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

every time that a==0x00

but your code is

if(a==oxoo) {

rather than

if(a==0x00) {

Quote:

But, Codevision program could not understand the second line of the above code...

Quote the error message exactly as it appeared.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you want lcd_putc(). (or maybe it is lcd_putchar() )

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good catch, Lee!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]