This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

数组定义报错:#19 extra text after expected end of number



我用CCS6.0定义了一个数组,编译时报这个错误:#19 extra text after expected end of number

报错的代码为如下第一行:

Uint16 const SCIBaudRate[7] = {SCI_BAUDRATE_1200,SCI_BAUDRATE_2400,SCI_BAUDRATE_4800};
Uint16 const SCICCR[3] = {FRAME_8N1,FRAME_8E1,FRAME_8O1};

以上两行我是定义了两个数组,数组中的元素是用宏定义在这个代码之前定义的,如:

//Baud rate based on 37.5MHZ LSPCLK
#define SCI_BAUDRATE_1200 0x0F41
#define SCI_BAUDRATE_2400 0x07A0
#define SCI_BAUDRATE_4800 0x03DO

//SCI frame format
#define FRAME_8N1 0x0007
#define FRAME_8E1 0x0067
#define FRAME_8O1 0x0027

奇怪的有两点:

1、第一行代码报错,第二行不会报

2、第一行代码如果大括号里只有两个元素即只初始化数组的前两个元素则不会报,只要增加到3个及以上肯定会报

请问哪位知道这是怎么回事?