I may be way off the mark here because I've never used C18, however, these examples are either bad or wrong. In C, a "char" is a single character, and normally one byte. A string is an array of char . Therefore, const char str1 = "hello world"; is either illegal, or, depending on how the compiler handles it, might well be the same as saying const char str1 = 'h'; What you actually want to do is say:- const char[] str1 = "hello world"; This will create str1 as a pointer to the first element of an array preinitialised to contain that string, and null terminated. Additionally, const char * str3 = "hello world"; is also either illegal, or in some compilers will produce not quite the effect you're looking for. It would potentially create a char pointer, which is preconfigured to point to whatever value is represented by that string. In Win32, pointers are 32 bit, so that would (in visual c++) create a const char pointer that points to a memory address of "hell" (0x68656C6C), which is an Access Violation / Protection fault waiting to happen. Additionally, remember that a "const char *" is a pointer whose value (ie what it points to) is fixed, however, you can (normally) write to the address pointed to by the pointer. eg:- const char * c = 0x70 *c = 'A' ; // valid-> 0x70 now contains 'A' c = &otherchar ; // invalid. c is const. Hope that ramble helps :) > -----Original Message----- > From: Wouter van Ooijen [mailto:wouter@VOTI.NL] > Sent: 27 October 2003 12:12 > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: LCD String function > > > > Cons unsigned char str1 = "String number 1"; > > unsigned char str2 = "String number 2"; > > > > > > Lcd_puts(str1); > > Lcd_puts(str2); > > Lcd_puts("String Number 3"); > > Did you try that on C18? And did you try > > cons rom char * str3 = "String number 3"; > Lcd_puts(str3); > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply > us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body