This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Passing strings to a display routine

I have used the following code to send a display string to an RS232 port. It always worked in Keil Microvision2. Now in microvision5 it does not.

DispString (“Abcdefg\n”);

Void DispString ( unsigned char *gp) {
unsigned char i;
For (i=0; *(gp+i) != ‘\n’; i++) { putChar (*(gp+i) ); }
}

So why does the above DispString not work..??
I get no error messages.
However if I change (“Abcdefg”) to (‘Abcdefg’) I get error message …. > too many characters in character literal – extra leading characters ignored..
Can anyone explain and tell me what is the correct way in #5 (and maybe why it doesn't ?)
Thanks.
Bhal

0