> From: Microchip [mailto:microchip@novabiomatique.com] > > I want to declare an array of strings like : > > const unsigned char Str1 [2][5] = {"Hello", "Bye "}; > > My problem is the compilator doesn't put the null caracter > (\0) at end of each string. > > I also try : > > const unsigned char Str1 [2][6] = {"Hello", "Bye "}; > > but it also doesn't work. > > Please can someone help me? Using PIC-C 7.87PL2, I wrote the following code: #include const unsigned char Str1 [2][6] = {"Hello", "Bye "}; void main(void) { int i; i = (Str1[2][3] == 'q'); return; } and looking at the listing, I see: 18 0009 _Str1 19 0009 3448 retlw (((048h))) 20 000A 3465 retlw (((065h))) 21 000B 346C retlw (((06Ch))) 22 000C 346C retlw (((06Ch))) 23 000D 346F retlw (((06Fh))) 24 000E 3400 retlw 0 25 000F 3442 retlw (((042h))) 26 0010 3479 retlw (((079h))) 27 0011 3465 retlw (((065h))) 28 0012 3420 retlw (((020h))) 29 0013 3420 retlw (((020h))) 30 0014 3400 retlw 0 The NULLs are being allocated at the end of each string as (0x000E and 0x0014) as I would expect. -Mike -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics