#include<reg51.h> #include<string.h> #include<stdio.h> #define lcd_data P1 sbit rs=P2^0; sbit rw=P2^1; sbit en=P2^2; unsigned char n[5]="hello"; unsigned char m[]="welcome rakesh"; void cmd_lcd(unsigned char); void write_lcd(char); void delay(unsigned int); void lcd_int() { cmd_lcd(0x38); cmd_lcd(0x0c); cmd_lcd(0x01); cmd_lcd(0x80); } void cmd_lcd(unsigned char x) { x=lcd_data; rs=0; rw=0; en=1; delay(50); en=0; }
void write_lcd(char s) {
s=lcd_data; rs=1; rw=0; en=1; delay(500); en=0; } void delay(unsigned int temp) { unsigned int i,j; for(i=0;i<255;i++); for(j=0;j<temp;j++); }
void main() { void lcd_int(); void write_lcd(n); void delay(500); void cmd_lcd(0x01); void delay(100); void write_lcd(m); void delay(100); }
this code shows following error: Build target 'Target 1' compiling lcdc04.c... LCDC04.C(50): error C161: 'n': formal parameter ignored Target not created
please help me in clearing this...
Dan,
I'm very confused with what you say.
You said that what Jameel was telling the OP was wrong, but then you provide a link which actually supports what he said.
That is:
Passing the wrong type of parameter. Jameel said "you call write_lcd with n. n is the name of an array of characters. what c does is pass the address of the array. and your function write_lcd expects a single character. not an address to an array of characters." Lint reports "Type mismatch". Not totally correct, but a reasonable start.
Incorrect position of void. Jameel said "(Rakesh mate. look at the void.)". We can only guess how much was understood with that, but along the right lines.
And yes, I acknowledge that there are other errors/warnings that Lint picked up.
Please don't fall into that distasteful habit that certain other posters have on this forum.
"You said that what Jameel was telling the OP was wrong, but then you provide a link which actually supports what he said."
No, Jameel is stuck on function invocation; that is, calling. There is no "calling" being performed. The code's incorrectness hasn't even allowed lint to complain about a function call (yet).
He also added:
(Rakesh mate. look at the void.)
Not a bad clue.
That he did. After twice claiming the opposite. And when he finally admitted his mistake, he made every effort to avoid it being noticed: an extremely vague hint, in parentheses, in the middle of an unrelated argument.
That's not a clue: it's somebody doing his best to avoid the notion that he proclaimed nonsense twice in a row, now hedging his bets by dropping a vague hint pointing in the direction of where he's now beginning to see his mistake must have lain.
That he did. After twice claiming the opposite. ...
LMFAO.
Would you give me your address? I would like to forward you a series of books on a collection of subjects to help you with your apparent deficiencies.
"LMFAO."
You should stick with acting. Your man-fly portrayal was funny.
Ah, I see what you did there. You took my name and likened it to the actor in the film "The Fly"; a Jeff Goldblum.
How witty.
It seems that this forum does not permit beginners helping beginners
permit? sure, but when the result is the blind leading the deaf, some comment should be anticipated.
Erik
... but when the result is the blind leading the deaf ...
Thanks. You proved my point quite nicely.
Me too.
Jameel first: "you call write_lcd with n." Jameel second: "// calling write_lcd with n"
Let's see, that makes twice. Count much, Jeff?
Zeusti.
The opposite claim counter.
Someone at temps to impersonanate me!
Why?
I AM NOT TAKING ANY SIDE IN THE DISCUSIEN
Always yo're friend.
I would like to forward you a series of books on a collection of subjects to help you with your apparent deficiencies.
You better keep those. It would be irresponsible of me to deprive you of those learning materials. You clearly need them more.
You clearly need them more.
Stop. Stop already. My sides can't take much more of it.
"Stop. Stop already. My sides can't take much more of it."
A truly mature and masterful reply, it's just so well done. You have closed this thread showing incredible skills.
A truly mature and masterful reply, it's just so well done.
At least I am mature enough to use my real name.
Google does a very good job of revealing what you are about.
"At least I am mature enough to use my real name."
Well, let's see: so what we have here is one first-time-ever poster in this forum, who appeared out of thin air with the sole apparent purpose of supporting the failed arguments of another person --- whom coincidentally we had also never heard of here before this thread. And you seriously expect anyone to believe you're not just a sock-puppet? Really?
Or not old and wise enough not too, Google searches cut both ways.
Now that is a proper and good answer ;-)
View all questions in Keil forum