Keil uVision2编译中的syntax error near'unsigned'是什么意思?
初次用Keil uVision2
程序好下:
#include <reg52.h>
#include <ABSACC.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
#define TRUE 1
#define FALSE 0
uint key_flag=0;/*按键标志*/
uint set_flag=0;/*设置标志*/
uchar temp[3];
uchar temp4[3];
uchar key_value[16]={0x11,0x21,0x41,0x81,0x12,0x22,0x42,0x82,0x14,0x24,0x44,0x84,0x18,0x28,0x48,0x88};
uchar disarr[9];/*P0口送出显示*********************************************/
uchar dis_key[10]={0x3f,0x03,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};/*0-->9*/
/*
0x11:
0x21:
0x31:0
0x41:生产置数
0x12:1
0x22:2
0x32:3
0x42:目标置数
0x13:4
0x23:5
0x33:6
0x43:count
0x14:7
0x24:8
0x34:9
0x44:pause
*/
void init(); /*fun 声明*/
uchar keyscan();
void display();
void delay_10ms();
/**********main()*************************/
void main(void){
init();
uchar key_value;
uchar n,i;
do
{
key_value=keyscan();
if(key_flag)
if(key_value==0x41||key_valude==0x42)set_flag=1;
if(set_flag)switch(key_value){
case 0x42:/**目标置数**/
do{
i=0;
key_flag=0;
key_value=keyscan();
if(key_flag){
if((key_value!=0x41)&&(key_value!=0x42)&&(key_value!=0x43)&&(key_value!=0x44)){
temp[i]=key_value;
temp4[i]=code(temp[i]);
disarr[i]=temp4[i];/*用于显示,装入显示数组*/
P2=i; /**送地址**/
P0=dis_key[temp4[i]];/**送显示**/
i++;}
}
}while(i<4);
break;
case 0x41:/**生产置数**/
do{
i=0;
key_flag=0;
key_value=keyscan();
if(key_flag){
if((key_value!=0x41)&&(key_value!=0x42)&&(key_value!=0x43)&&(key_value!=0x44)){
temp[i]=key_value;
temp4[i+4]=code(temp[i]);
P2=i+4; /**送地址**/
P0=dis_key[temp4[i]];/**送显示**/
i++;}
}
}while(i<4);
for(i=4;i<9;i++)disarr[i]=temp4[i];
TH0=temp4[0]*10+temp4[1];/**计数器初值**/
TL0=temp4[2]*10+temp4[3];
TR0=0; /*stop count */
break;
}/*if*/
key_value=keyscan();
if(key_flag)
if(key_value==0x43)TR0=1;
key_flag=0;
key_value=keyscan();
if(key_flag)
if(key_value==0x44)TR0=0;
display();
}while(TURE);
}
/**********************end main*********************/
/****************key scan*******************/
uchar keyscan(void)
{
uchar readkey,rereadkey;
uchar x_temp,y_temp;
key_flag=0;
x_temp=(P1=0x0f)&0x0f;
if(x_temp==0x0f)return(0xff);
y_temp=(P1=0xf0)&0xf0;
readkey=x_temp|y_temp;
delay_10ms;
x_temp=(P1=0x0f)&0x0f;
y_temp=(P1=0xf0)&0xf0;
rereadkey=x_temp|y_temp;
if(readkey==rereadkey){
key_flag=1;
return(readkey);
};/*if*/
}/* fun keyscan */
/*****************delay_10ms*****************/
void delay_10ms(void){ /*晶振为12M, 10000个空操作为10ms*/
uint i=0,j=0;
for(i=0,i<100,i++){
for(j=0,j<100,j++)
_nop_();
}
}/*delay_10ms*/
/*****************timer0**********************/
unsigned 附近有语法错误